mirror of https://github.com/nodejs/node.git
fs: make fs.symlink() with no callback async
Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously.pull/24503/head
parent
b9c5eee7d9
commit
c381662cac
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue