Skip to content

Commit

Permalink
fs: use kMaxLength from binding
Browse files Browse the repository at this point in the history
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: nodejs#1898
PR-URL: nodejs#1903
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
vkurchatkin committed Jun 5, 2015
1 parent 81029c6 commit 2dcef83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Readable = Stream.Readable;
const Writable = Stream.Writable;

const kMinPoolSpace = 128;
const kMaxLength = require('internal/smalloc').kMaxLength;
const kMaxLength = process.binding('smalloc').kMaxLength;

const O_APPEND = constants.O_APPEND || 0;
const O_CREAT = constants.O_CREAT || 0;
Expand Down

0 comments on commit 2dcef83

Please sign in to comment.