Browse Source

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: https://github.com/isaacs/node-graceful-fs/issues/41
Fixes: https://github.com/nodejs/io.js/issues/1898
PR-URL: https://github.com/nodejs/io.js/pull/1903
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
v2.3.1-release
Vladimir Kurchatkin 10 years ago
parent
commit
2dcef83b5f
  1. 2
      lib/fs.js

2
lib/fs.js

@ -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;

Loading…
Cancel
Save