Skip to content

path.win32.isAbsolute considers relative paths absolute #56766

Open
@reverofevil

Description

@reverofevil

Version

22.11.0

Platform

Linux pc 6.8.0-48-generic #48-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 14:04:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

require('path').win32.isAbsolute('\\foo') === true

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 cd on Windows:

C:\Users\user> cd \Windows
C:\Windows>

\Windows is relative to drive name.

Expected output for isAbsolute() is false.

What do you see instead?

isAbsolute() is true.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    pathIssues and PRs related to the path subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions