diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index 989bccc7c153d3..b8ec0726885669 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -267,7 +267,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);