Repository navigation
path.win32.isAbsolute considers relative paths absolute #56766
Description
Activity
- addedpathIssues and PRs related to the path subsystem.Issues and PRs related to the path subsystem.
on Jan 26, 2025 That is normal to be true.
"relative to drive name" is still an absolute path, imo - it's just a concept that doesn't exist on any other OS.
If it's an absolute path, can you move source code to another drive, and get it work the same way?
I hope we're not here to blame windows for having weird features other OSes don't, but to get Node.js
pathlibrary right, and applications breaking due to relative paths considered absolute is not right.Reacted by Jordan HarbandThat’s a fair point - i meant more that windows has three concepts (relative, absolute, and drive-relative) and every other OS has two (relative and absolute), and node doesn’t seem to have any concept of drive-relative yet, so I’m not sure what a safe fix would be.
Should I try to implement a fix?
To get more info: Is this "drive-relative" concept "official"? Does Windows really consider it relative or is it just an argument you're making?
If all three components are present, the path is absolute. If no volume or drive letter is specified and the directory name begins with the directory separator character, the path is relative from the root of the current drive.
@gurgunday unfortunately i'm not clear on what would be the best path. it seems like it would have been better for node to have 3 concepts to begin with since windows has 3, but node has always only had 2, so this ambiguity persists.
Reacted by Gürgün Dayıoğlugithub-actions commented
on Apr 22, 2026 on Apr 22, 2026 – with GitHub ActionsContributorMore actionsThis issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Apr 22, 2026 comment
- removedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Apr 23, 2026 github-actions commented
on Jul 23, 2026 on Jul 23, 2026 – with GitHub ActionsContributorMore actionsThis issue has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Jul 23, 2026 comment
- removedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Jul 26, 2026
Version
22.11.0
Platform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Yes. No.
What is the expected behavior? Why is that the expected behavior?
Here's a behavior of
cdonWindows:\Windowsis relative to drive name.Expected output for
isAbsolute()is false.What do you see instead?
isAbsolute()is true.Additional information
(Edited to prevent the issue from deletion by dumb AI.)