mirror of https://github.com/nodejs/node.git
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
parent
08b382c2fb
commit
5fba3b85c5
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue