aboutsummaryrefslogtreecommitdiffstats
path: root/extension
diff options
context:
space:
mode:
authorOmar Rizwan <omar.rizwan@gmail.com>2019-02-27 23:38:12 -0800
committerOmar Rizwan <omar.rizwan@gmail.com>2019-02-27 23:38:12 -0800
commitb18fc10e1420cdb32068b4452e9c1e5d9fa7024d (patch)
tree571714551a179532389bc5deec7c68bd33536972 /extension
parent73f8bc754e200c041e17e613a61dfc35db414b66 (diff)
Report ENOTSUP for Mac xattr files.
Lets me open png files (in Preview) in tree/, at least!
Diffstat (limited to 'extension')
-rw-r--r--extension/background.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/extension/background.js b/extension/background.js
index 6653edd..0bf5808 100644
--- a/extension/background.js
+++ b/extension/background.js
@@ -5,6 +5,7 @@ const unix = {
EINTR: 4,
EIO: 5,
ENXIO: 6,
+ ENOTSUP: 45,
// Unix file types
S_IFMT: 0170000, // type of file mask
@@ -118,6 +119,8 @@ const router = {
const tabId = parseInt(pathComponent(path, -3));
const suffix = pathComponent(path, -1);
+ if (suffix.startsWith("._")) throw new UnixError(unix.ENOTSUP);
+
if (!debugged[tabId]) throw new UnixError(unix.EIO);
await sendDebuggerCommand(tabId, "Page.enable", {});