diff --git a/websocketfs/lib/sftp-fuse.ts b/websocketfs/lib/sftp-fuse.ts index ba4b829..8fc44c1 100644 --- a/websocketfs/lib/sftp-fuse.ts +++ b/websocketfs/lib/sftp-fuse.ts @@ -285,7 +285,15 @@ export default class SftpFuse { } cb(0); } catch (err) { - fuseError(cb)(err); + if (err.errno == -2) { + // sometimes this happens when flush after fd + // is no longer available. Not sure why. E.g., when starting sage. + // so we log it but make it non-fatal. + log("flush", err); + cb(0); + } else { + fuseError(cb)(err); + } } } diff --git a/websocketfs/package.json b/websocketfs/package.json index c869961..07418ea 100644 --- a/websocketfs/package.json +++ b/websocketfs/package.json @@ -1,6 +1,6 @@ { "name": "websocketfs", - "version": "0.8.0", + "version": "0.8.1", "description": "Like sshfs, but over a WebSocket", "main": "./dist/lib/index.js", "scripts": {