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)
pull/24503/head
Ben Noordhuis 2012-08-08 23:07:18 +02:00
parent 08b382c2fb
commit 5fba3b85c5
1 changed files with 1 additions and 1 deletions

View File

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