summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-06-06 21:07:54 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2012-06-06 21:08:38 +0200
commitc381662cac0e897b4bfdb2c31cd3117c5ecd2130 (patch)
tree975f34f66c29eec1fbfaa006e2116f402a6546ee
parentb9c5eee7d9ad8d720c6f28dc78ab288c7b0e004c (diff)
downloadnode-c381662cac0e897b4bfdb2c31cd3117c5ecd2130.tar.gz
fs: make fs.symlink() with no callback async
Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously.
-rw-r--r--lib/fs.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fs.js b/lib/fs.js
index d1700a978..00f5805b2 100644
--- a/lib/fs.js
+++ b/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);