Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
bnoordhuis committed Aug 8, 2012
1 parent 08b382c commit 5fba3b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fs.js
Expand Up @@ -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;
Expand Down

0 comments on commit 5fba3b8

Please sign in to comment.