From 5fba3b85c5a50b6b8c9061d951dc09da8a221d40 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 8 Aug 2012 23:07:18 +0200 Subject: [PATCH] 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) --- lib/fs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fs.js b/lib/fs.js index b71cff6c675..8e7ae5d30fc 100644 --- a/lib/fs.js +++ b/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;