bare-fs 4.4.11 → 4.5.1
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 +36 -3
- package/index.js +1 -1
- package/package.json +1 -1
- package/prebuilds/android-arm/bare-fs.bare +0 -0
- package/prebuilds/android-arm64/bare-fs.bare +0 -0
- package/prebuilds/android-ia32/bare-fs.bare +0 -0
- package/prebuilds/android-x64/bare-fs.bare +0 -0
- package/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/prebuilds/darwin-x64/bare-fs.bare +0 -0
- package/prebuilds/ios-arm64/bare-fs.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
- package/prebuilds/linux-arm64/bare-fs.bare +0 -0
- package/prebuilds/linux-x64/bare-fs.bare +0 -0
- package/prebuilds/win32-arm64/bare-fs.bare +0 -0
- package/prebuilds/win32-x64/bare-fs.bare +0 -0
package/binding.c
CHANGED
|
@@ -135,7 +135,8 @@ bare_fs__on_request_result(uv_fs_t *handle) {
|
|
|
135
135
|
err = js_create_int32(env, status, &args[1]);
|
|
136
136
|
assert(err == 0);
|
|
137
137
|
|
|
138
|
-
js_call_function(env, ctx, on_result, 2, args, NULL);
|
|
138
|
+
err = js_call_function(env, ctx, on_result, 2, args, NULL);
|
|
139
|
+
(void) err;
|
|
139
140
|
|
|
140
141
|
err = js_close_handle_scope(env, scope);
|
|
141
142
|
assert(err == 0);
|
|
@@ -420,6 +421,21 @@ bare_fs_request_result_dirents(js_env_t *env, js_callback_info_t *info) {
|
|
|
420
421
|
|
|
421
422
|
static void
|
|
422
423
|
bare_fs__on_open(uv_fs_t *handle) {
|
|
424
|
+
int err;
|
|
425
|
+
|
|
426
|
+
bare_fs_req_t *req = (bare_fs_req_t *) handle;
|
|
427
|
+
|
|
428
|
+
int status = handle->result;
|
|
429
|
+
|
|
430
|
+
if (req->exiting && status >= 0) {
|
|
431
|
+
int fd = status;
|
|
432
|
+
|
|
433
|
+
uv_fs_req_cleanup(handle);
|
|
434
|
+
|
|
435
|
+
err = uv_fs_close(handle->loop, handle, fd, NULL);
|
|
436
|
+
assert(err == 0);
|
|
437
|
+
}
|
|
438
|
+
|
|
423
439
|
bare_fs__on_request_result(handle);
|
|
424
440
|
}
|
|
425
441
|
|
|
@@ -1656,6 +1672,21 @@ bare_fs_symlink_sync(js_env_t *env, js_callback_info_t *info) {
|
|
|
1656
1672
|
|
|
1657
1673
|
static void
|
|
1658
1674
|
bare_fs__on_opendir(uv_fs_t *handle) {
|
|
1675
|
+
int err;
|
|
1676
|
+
|
|
1677
|
+
bare_fs_req_t *req = (bare_fs_req_t *) handle;
|
|
1678
|
+
|
|
1679
|
+
int status = handle->result;
|
|
1680
|
+
|
|
1681
|
+
if (req->exiting && status >= 0) {
|
|
1682
|
+
uv_dir_t *dir = handle->ptr;
|
|
1683
|
+
|
|
1684
|
+
uv_fs_req_cleanup(handle);
|
|
1685
|
+
|
|
1686
|
+
err = uv_fs_closedir(handle->loop, handle, dir, NULL);
|
|
1687
|
+
assert(err == 0);
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1659
1690
|
bare_fs__on_request_result(handle);
|
|
1660
1691
|
}
|
|
1661
1692
|
|
|
@@ -1868,7 +1899,8 @@ bare_fs__on_watcher_event(uv_fs_event_t *handle, const char *filename, int event
|
|
|
1868
1899
|
memcpy(data, (void *) filename, len);
|
|
1869
1900
|
}
|
|
1870
1901
|
|
|
1871
|
-
js_call_function(env, ctx, on_event, 3, args, NULL);
|
|
1902
|
+
err = js_call_function(env, ctx, on_event, 3, args, NULL);
|
|
1903
|
+
(void) err;
|
|
1872
1904
|
|
|
1873
1905
|
err = js_close_handle_scope(env, scope);
|
|
1874
1906
|
assert(err == 0);
|
|
@@ -1915,7 +1947,8 @@ bare_fs__on_watcher_close(uv_handle_t *handle) {
|
|
|
1915
1947
|
err = js_delete_reference(env, watcher->ctx);
|
|
1916
1948
|
assert(err == 0);
|
|
1917
1949
|
|
|
1918
|
-
js_call_function(env, ctx, on_close, 0, NULL, NULL);
|
|
1950
|
+
err = js_call_function(env, ctx, on_close, 0, NULL, NULL);
|
|
1951
|
+
(void) err;
|
|
1919
1952
|
|
|
1920
1953
|
err = js_close_handle_scope(env, scope);
|
|
1921
1954
|
assert(err == 0);
|
package/index.js
CHANGED
|
@@ -1576,7 +1576,7 @@ async function writeFile(filepath, data, opts, cb) {
|
|
|
1576
1576
|
len += await write(fd, len ? data.subarray(len) : data)
|
|
1577
1577
|
if (len === data.byteLength) break
|
|
1578
1578
|
}
|
|
1579
|
-
} catch (
|
|
1579
|
+
} catch (e) {
|
|
1580
1580
|
err = e
|
|
1581
1581
|
} finally {
|
|
1582
1582
|
if (fd !== -1) await close(fd)
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|