mirror of
https://github.com/osnr/TabFS.git
synced 2024-04-30 04:52:48 +02:00
fix base64-encoded reads!
This commit is contained in:
parent
3a623f17c4
commit
03219b64d7
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue