From 570fd55297ef47266298adb7e7c54be03ea45934 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Wed, 20 May 2020 13:01:13 +0200 Subject: [PATCH] fix detatch --- fuse-native.c | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fuse-native.c b/fuse-native.c index 64bc00f..d564060 100644 --- a/fuse-native.c +++ b/fuse-native.c @@ -380,7 +380,7 @@ FUSE_METHOD(read, 6, 2, (const char *path, char *buf, size_t len, off_t offset, napi_create_uint32(env, l->len, &(argv[5])); FUSE_UINT64_TO_INTS_ARGV(l->offset, 6) }, { - napi_detach_arraybuffer(env, argv[3]); + assert(napi_detach_arraybuffer(env, argv[3]) == napi_ok); }) FUSE_METHOD(write, 6, 1, (const char *path, const char *buf, size_t len, off_t offset, struct fuse_file_info *info), { diff --git a/index.js b/index.js index 8e162ca..74923bd 100644 --- a/index.js +++ b/index.js @@ -458,7 +458,7 @@ class Fuse extends Nanoresource { _op_read (signal, path, fd, buf, len, offsetLow, offsetHigh) { this.ops.read(path, fd, buf, len, getDoubleArg(offsetLow, offsetHigh), (err, bytesRead) => { - return signal(err, bytesRead, buf) + return signal(err, bytesRead, buf.buffer) }) }