Skip to content

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA problem that causes incorrect behavior or crashes.cross-platformIssues related to making Wave work seamlessly across multiple operating systems.help wantedThe issue requires extra attention or help from others.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions