fix base64-encoded reads!

This commit is contained in:
Omar Rizwan 2020-11-22 15:36:21 -08:00
parent 3a623f17c4
commit 03219b64d7

View file

@ -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);