From b18fc10e1420cdb32068b4452e9c1e5d9fa7024d Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Wed, 27 Feb 2019 23:38:12 -0800 Subject: [PATCH] Report ENOTSUP for Mac xattr files. Lets me open png files (in Preview) in tree/, at least! --- extension/background.js | 3 +++ 1 file changed, 3 insertions(+) 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", {});