bare-fs 1.6.6 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.c +3 -6
- package/index.js +4 -4
- package/package.json +1 -1
package/binding.c
CHANGED
|
@@ -73,17 +73,14 @@ on_fs_response (uv_fs_t *uv_req) {
|
|
|
73
73
|
|
|
74
74
|
err = js_create_error(env, code, message, &argv[1]);
|
|
75
75
|
assert(err == 0);
|
|
76
|
-
|
|
77
|
-
err = js_get_null(env, &argv[2]);
|
|
78
|
-
assert(err == 0);
|
|
79
76
|
} else {
|
|
80
77
|
err = js_get_null(env, &argv[1]);
|
|
81
78
|
assert(err == 0);
|
|
82
|
-
|
|
83
|
-
err = js_create_int32(env, uv_req->result, &argv[2]);
|
|
84
|
-
assert(err == 0);
|
|
85
79
|
}
|
|
86
80
|
|
|
81
|
+
err = js_create_int32(env, uv_req->result, &argv[2]);
|
|
82
|
+
assert(err == 0);
|
|
83
|
+
|
|
87
84
|
uv_fs_req_cleanup(uv_req);
|
|
88
85
|
|
|
89
86
|
if (req->data) {
|
package/index.js
CHANGED
|
@@ -225,7 +225,7 @@ function read (fd, buffer, offset, len, pos, cb) {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
if (typeof
|
|
228
|
+
if (typeof pos !== 'number') pos = -1
|
|
229
229
|
|
|
230
230
|
const req = getReq()
|
|
231
231
|
req.callback = cb
|
|
@@ -264,7 +264,7 @@ function readv (fd, buffers, pos, cb) {
|
|
|
264
264
|
throw typeError('ERR_INVALID_ARG_TYPE', 'Callback must be a function. Received type ' + (typeof cb) + ' (' + cb + ')')
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
if (typeof
|
|
267
|
+
if (typeof pos !== 'number') pos = -1
|
|
268
268
|
|
|
269
269
|
const req = getReq()
|
|
270
270
|
req.callback = cb
|
|
@@ -302,7 +302,7 @@ function write (fd, buffer, offset, len, pos, cb) {
|
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
-
if (typeof
|
|
305
|
+
if (typeof pos !== 'number') pos = -1
|
|
306
306
|
|
|
307
307
|
const req = getReq()
|
|
308
308
|
req.callback = cb
|
|
@@ -341,7 +341,7 @@ function writev (fd, buffers, pos, cb) {
|
|
|
341
341
|
throw typeError('ERR_INVALID_ARG_TYPE', 'Callback must be a function. Received type ' + (typeof cb) + ' (' + cb + ')')
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
if (typeof
|
|
344
|
+
if (typeof pos !== 'number') pos = -1
|
|
345
345
|
|
|
346
346
|
const req = getReq()
|
|
347
347
|
req.callback = cb
|