Skip to content

Distinguish Windows drive-relative, rooted and UNC paths in path_is_abs #529

Closed

Description

@LunaStev

path_is_abs returns true for any nonempty character followed by a colon, and recognizes a leading slash but not a leading backslash. This classifies C:relative and 1:relative as absolute while rejecting a full UNC path such as \\server\share\file. Windows drive-relative names must not be confused with a drive root. The function also needs an explicit target policy instead of applying drive syntax indiscriminately to Unix paths.

Source evidence at the head of #520:

Acceptance:

  • Make the target-specific interpretation explicit in the implementation and short API comments.
  • Cover relative names, drive-relative C:foo, drive-rooted C:\foo, UNC paths, root-relative paths and ordinary Unix absolute paths.
  • Require a valid drive prefix and distinguish rooted paths from fully qualified paths where needed.
  • Keep byte-boundary reads safe for empty and one-byte strings.

API/reference context: Windows fully qualified and relative paths.

Audit status: identified by static source inspection; the scenarios above have not been executed during this audit. The permalink fixes the reviewed revision; this report does not claim the defect was introduced by #520.

Activity

  1. added
    bug
    help wanted
    cross-platform
    on Sep 8, 2026
  2. self-assigned this
    on Sep 22, 2026
  3. added a commit that references this issue on Sep 24, 2026
    01955d7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcross-platformhelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions