Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit c381662cac0e897b4bfdb2c31cd3117c5ecd2130 1 parent b9c5eee
@bnoordhuis bnoordhuis authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/fs.js
View
2  lib/fs.js
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.