Permalink
Browse files

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

Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously.
  • Loading branch information...
1 parent b9c5eee commit c381662cac0e897b4bfdb2c31cd3117c5ecd2130 @bnoordhuis bnoordhuis committed Jun 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/fs.js
View
@@ -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);

0 comments on commit c381662

Please sign in to comment.