diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index b005a5793387ea..04ae34e41fd606 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -296,7 +296,8 @@ function preprocessSymlinkDestination(path, type, linkPath) { if (!isWindows) { // No preprocessing is needed on Unix. return path; - } else if (type === 'junction') { + } + if (type === 'junction') { // Junctions paths need to be absolute and \\?\-prefixed. // A relative target is relative to the link's parent directory. path = pathModule.resolve(linkPath, '..', path);