From c381662cac0e897b4bfdb2c31cd3117c5ecd2130 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 6 Jun 2012 21:07:54 +0200 Subject: [PATCH] fs: make fs.symlink() with no callback async Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously. --- lib/fs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fs.js b/lib/fs.js index d1700a978fb..00f5805b26d 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);