-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
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: tested with v7.7.4 and v9.2.0
- Platform: Windows 10 (64-bit)
- Subsystem: path
Code says it best:
> path.relative('c:', 'c:\\test')
'..\\..\\test'
> path.relative('c:', 'c:/test')
'..\\..\\test'
Not sure why c: is treated differently here, but for all other volumes it returns the right result:
> path.relative('d:', 'd:\\test')
'test'
> path.relative('d:', 'd:/test')
'test'
also it appears to happen only on the root level:
> path.relative('c:\\test', 'c:\\test\\sub')
'sub'
and only if the colon is the last character of the base path
> path.relative('c:\\', 'c:\\test')
'test'
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.