Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
fs: make fs.symlink() with no callback async
Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously.
  • Loading branch information
bnoordhuis committed Jun 6, 2012
1 parent b9c5eee commit c381662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fs.js
Expand Up @@ -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);
Expand Down

0 comments on commit c381662

Please sign in to comment.