bare-fs 4.1.1 → 4.1.2
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/index.js +4 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -848,6 +848,8 @@ function ftruncate(fd, len, cb) {
|
|
|
848
848
|
)
|
|
849
849
|
}
|
|
850
850
|
|
|
851
|
+
if (typeof len !== 'number') len = 0
|
|
852
|
+
|
|
851
853
|
const req = getReq()
|
|
852
854
|
req.callback = cb
|
|
853
855
|
binding.ftruncate(req.handle, fd, len)
|
|
@@ -873,6 +875,8 @@ function ftruncateSync(fd, len) {
|
|
|
873
875
|
)
|
|
874
876
|
}
|
|
875
877
|
|
|
878
|
+
if (typeof len !== 'number') len = 0
|
|
879
|
+
|
|
876
880
|
binding.ftruncateSync(fd, len)
|
|
877
881
|
}
|
|
878
882
|
|