fix write (base64-encoding)

This commit is contained in:
Omar Rizwan 2020-12-02 16:57:06 -08:00
parent 71df7d3729
commit 506751b3d5
2 changed files with 2 additions and 1 deletions

View file

@ -359,6 +359,7 @@ function findRoute(path) {
let port;
async function onMessage(req) {
if (req.buf) req.buf = atob(req.buf);
console.log('req', req);
let response = { op: req.op, error: unix.EIO };

View file

@ -136,7 +136,7 @@ tabfs_write(const char *path, const char *buf, size_t size, off_t offset,
struct fuse_file_info *fi) {
send_request("{op: %Q, path: %Q, buf: %V, offset: %d, fh: %d, flags: %d}",
"write", path, size, buf, offset, fi->fh, fi->flags);
"write", path, buf, size, offset, fi->fh, fi->flags);
int ret; receive_response("{size: %d}", &ret); return ret;