Skip to content

Commit 2dcef83

Browse files
committed
fs: use kMaxLength from binding
This allows `graceful-fs` to evaluate `fs` source without access to internals. This is a temporary workaround that makes npm work. See: isaacs/node-graceful-fs#41 Fixes: #1898 PR-URL: #1903 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 81029c6 commit 2dcef83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/fs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Readable = Stream.Readable;
1919
const Writable = Stream.Writable;
2020

2121
const kMinPoolSpace = 128;
22-
const kMaxLength = require('internal/smalloc').kMaxLength;
22+
const kMaxLength = process.binding('smalloc').kMaxLength;
2323

2424
const O_APPEND = constants.O_APPEND || 0;
2525
const O_CREAT = constants.O_CREAT || 0;

0 commit comments

Comments
 (0)