-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
pathIssues and PRs related to the path subsystem.Issues and PRs related to the path subsystem.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Description
- Version: 6.3.1
- Platform: 64 bit Windows 10
- Subsystem:
path.js
When calling path.relative, if the to parameter refers to a UNC (network) path, the result is incorrect.
Steps to Reproduce
Run the following program:
var path = require('path');
console.log(path.relative('c:\\some\\directory', '\\\\localhost\\c$\\another\\directory'));
Expected Result
The console output should be \\localhost\c$\another\directory because no relative path exists between the two paths.
Actual Result
The console output is localhost\c$\another\directory: the leading double backslash is omitted.
Extra Notes
The output is correct for two UNC paths to the same host. The output is incorrect for two UNC paths to different hosts.
Metadata
Metadata
Assignees
Labels
pathIssues and PRs related to the path subsystem.Issues and PRs related to the path subsystem.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.