mirror of
https://github.com/osnr/TabFS.git
synced 2024-05-23 16:02:18 +02:00
background: add comment to tabId directory
This commit is contained in:
parent
9694aaf8a2
commit
1dd5136415
|
@ -238,10 +238,15 @@ Routes["/tabs/by-id/#TAB_ID"] = routeDefer(() => {
|
|||
return {
|
||||
...tabIdDirectory.routeForRoot, // so getattr is inherited
|
||||
async readdir(req) {
|
||||
// readdir should return both entries from the writable part of
|
||||
// the directory & entries from the builtin part
|
||||
// (kinda https://twitter.com/rsnous/status/1363884562300870658)
|
||||
const entries =
|
||||
[...(await tabIdDirectory.routeForRoot.readdir(req)).entries,
|
||||
...(await childrenRoute.readdir(req)).entries];
|
||||
return {entries: [...new Set(entries)]};
|
||||
// (it might be nice to have a combinator or something to do
|
||||
// this automatically, to make 'union directories'...)
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue