Skip to content

Commit

Permalink
fs: unify style in preprocessSymlinkDestination
Browse files Browse the repository at this point in the history
Removes the else after return to match rest of the style of
the function.

PR-URL: #33496
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
bzoz authored and BridgeAR committed May 23, 2020
1 parent 842a895 commit 4a911d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/internal/fs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4a911d4

Please sign in to comment.