Browse Source

fs: fix ReferenceError in truncateSync()

Fixes a minor oversight introduced in 168a555, resulting in the following error:

  fs.js:467
      return fs.ftruncateSync(path, len, callback);
                                         ^
  ReferenceError: callback is not defined
      at Object.fs.truncateSync (fs.js:467:40)
v0.9.1-release
Ben Noordhuis 13 years ago
parent
commit
5fba3b85c5
  1. 2
      lib/fs.js

2
lib/fs.js

@ -464,7 +464,7 @@ fs.truncate = function(path, len, callback) {
fs.truncateSync = function(path, len) {
if (typeof path === 'number') {
// legacy
return fs.ftruncateSync(path, len, callback);
return fs.ftruncateSync(path, len);
}
if (typeof len === 'undefined') {
len = 0;

Loading…
Cancel
Save