From 1dd51364152f486e6b943c6b608e4ae1a69e2c8b Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Thu, 1 Jul 2021 16:24:59 -0700 Subject: [PATCH] background: add comment to tabId directory --- extension/background.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extension/background.js b/extension/background.js index 5325fa6..18f1b8b 100644 --- a/extension/background.js +++ b/extension/background.js @@ -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'...) } }; });