Browse Source

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

Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously.
v0.9.1-release
Ben Noordhuis 13 years ago
parent
commit
c381662cac
  1. 2
      lib/fs.js

2
lib/fs.js

@ -478,7 +478,7 @@ fs.readlinkSync = function(path) {
fs.symlink = function(destination, path, type_, callback) { fs.symlink = function(destination, path, type_, callback) {
var type = (typeof(type_) == 'string' ? type_ : null); var type = (typeof(type_) == 'string' ? type_ : null);
var callback_ = arguments[arguments.length - 1]; var callback_ = arguments[arguments.length - 1];
callback = (typeof(callback_) == 'function' ? callback_ : null); callback = (typeof(callback_) == 'function' ? callback_ : noop);
if (isWindows && type === 'junction') { if (isWindows && type === 'junction') {
destination = pathModule._makeLong(destination); destination = pathModule._makeLong(destination);

Loading…
Cancel
Save