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: #1898
  • Loading branch information
vkurchatkin committed Jun 5, 2015
1 parent 353e26e commit 4fd4838
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 4fd4838

Please sign in to comment.