apple / apple/swift-system

Non-Letter Drive Windows Paths Are Incorrectly Reported As Non-Absolute

Open
#271 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
1.4k
Forks
154
PR merge metrics
No merged PRs in 30d

Description

This is an edge-case for sure.

Here’s the source code:
```swift
print(FilePath(#"C:\foo"#).isAbsolute)
print(FilePath(#"+:\foo"#).isAbsolute)
print(FilePath(#"€:\foo"#).isAbsolute)
```

The three paths are valid absolute paths on Windows, however the output of this program will be `true`, `false`, `false`.

For more info see .

Contributor guide

Open the contributing guide

Research direction

Start by locating the FilePath.isAbsolute implementation and its Windows path handling, then reproduce the three examples from the issue. The work is done when C:\foo, +:\foo, and €:\foo are all reported as absolute paths on Windows, with tests covering the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.