diff options
author | Omar Rizwan <omar.rizwan@gmail.com> | 2020-11-22 15:36:21 -0800 |
---|---|---|
committer | Omar Rizwan <omar.rizwan@gmail.com> | 2020-11-22 15:36:21 -0800 |
commit | 03219b64d7636528712e3801e2393c284c04b431 (patch) | |
tree | aae6515a6a3c6dc7c926bd9876bf90e6261555c1 /extension | |
parent | 3a623f17c479fd8fc79732c52d52de81fa329873 (diff) |
fix base64-encoded reads!
Diffstat (limited to 'extension')
-rw-r--r-- | extension/background.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/extension/background.js b/extension/background.js index 4f4d115..c81be98 100644 --- a/extension/background.js +++ b/extension/background.js @@ -349,7 +349,14 @@ const ops = { async read({path, fh, size, offset}) { let route = findRoute(path); - if (route.read) return { buf: await route.read(path, fh, size, offset) }; + if (route.read) { + const ret = await route.read(path, fh, size, offset); + if (typeof ret === 'string') { + return { buf: ret }; + } else { + return ret; + } + } }, async write({path, buf, offset}) { let route = findRoute(path); |