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 codebytere committed Jul 8, 2020
1 parent 1b76377 commit adb93f1
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 @@ -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);
Expand Down

0 comments on commit adb93f1

Please sign in to comment.