fs: make fs.symlink() with no callback async

Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously.
pull/24503/head
Ben Noordhuis 2012-06-06 21:07:54 +02:00
parent b9c5eee7d9
commit c381662cac
1 changed files with 1 additions and 1 deletions

View File

@ -478,7 +478,7 @@ fs.readlinkSync = function(path) {
fs.symlink = function(destination, path, type_, callback) {
var type = (typeof(type_) == 'string' ? type_ : null);
var callback_ = arguments[arguments.length - 1];
callback = (typeof(callback_) == 'function' ? callback_ : null);
callback = (typeof(callback_) == 'function' ? callback_ : noop);
if (isWindows && type === 'junction') {
destination = pathModule._makeLong(destination);