bare-fs 4.4.7 → 4.4.8

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.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -219,10 +219,10 @@ async function access(filepath, mode = constants.F_OK, cb) {
219
219
  }
220
220
 
221
221
  function accessSync(filepath, mode = constants.F_OK) {
222
- using req = FileRequest.borrow()
223
-
224
222
  filepath = toNamespacedPath(filepath)
225
223
 
224
+ using req = FileRequest.borrow()
225
+
226
226
  try {
227
227
  binding.accessSync(req.handle, filepath, mode)
228
228
  } catch (e) {
@@ -1933,7 +1933,7 @@ class FileReadStream extends Readable {
1933
1933
  err = e
1934
1934
  }
1935
1935
 
1936
- if (err) return cb(err)
1936
+ if (err) return this.destroy(err)
1937
1937
 
1938
1938
  if (len === 0) return this.push(null)
1939
1939
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-fs",
3
- "version": "4.4.7",
3
+ "version": "4.4.8",
4
4
  "description": "Native file system operations for Javascript",
5
5
  "exports": {
6
6
  "./package": "./package.json",