Skip to content

Commit

Permalink
fix fs.truncate when first arg is an int fd
Browse files Browse the repository at this point in the history
  • Loading branch information
bjouhier committed Feb 7, 2015
1 parent d8baf8a commit 9010108
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,7 @@ fs.renameSync = function(oldPath, newPath) {

fs.truncate = function(path, len, callback) {
if (util.isNumber(path)) {
var req = new FSReqWrap();
req.oncomplete = callback;
return fs.ftruncate(path, len, req);
return fs.ftruncate(path, len, callback);
}
if (util.isFunction(len)) {
callback = len;
Expand Down

0 comments on commit 9010108

Please sign in to comment.