FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fs: make fs.symlink() with no callback async · robby/node@c381662 · GitHub

Repository navigation

Commit c381662

Browse files
committed
fs: make fs.symlink() with no callback async
Fix a bug where fs.symlink('foo', 'bar') executed symlink(2) synchronously.
1 parent b9c5eee commit c381662

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/fs.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ fs.readlinkSync = function(path) {
478478
fs.symlink = function(destination, path, type_, callback) {
479479
var type = (typeof(type_) == 'string' ? type_ : null);
480480
var callback_ = arguments[arguments.length - 1];
481-
callback = (typeof(callback_) == 'function' ? callback_ : null);
481+
callback = (typeof(callback_) == 'function' ? callback_ : noop);
482482

483483
if (isWindows && type === 'junction') {
484484
destination = pathModule._makeLong(destination);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL