LocalPath: prefix matching needs a four-way path kind, not IsPathRooted
I maintainer di solito rispondono entro 1 giorno
@ForNeVeR ci sta già lavorando.
Dal 21/9/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- csharp
- Ambito
- operating-systems
Direzione di ricerca
Start by reading LocalPath.IsPrefixOf, LocalPath.IsAbsolute, and both TODOs, then trace how PathStrings.Normalize represents drive-relative paths such as C:. Done means LocalPath distinguishes true absolute, rooted diskless, drive-relative, and true relative paths, and IsPrefixOf never treats different kinds as prefixes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
LocalPath.IsPrefixOf uses IsAbsolute (i.e. Path.IsPathRooted) to refuse comparisons between paths of differing absoluteness. That is only an approximation, because on Windows there are really four kinds of path, and no path of one kind should ever be considered a prefix of a path of another:
- true absolute —
C:\Windows - rooted diskless —
\Windows - current on disk —
C:(andC:Windows, relative to the current directory of driveC:) - true relative —
Windows,..\Windows
AbsolutePath exists to cover kind 1 only, while LocalPath is applicable to all four. IsPathRooted answers true for kinds 1, 2 and 3 alike, so the current check only separates {1, 2, 3} from {4}.
Kind 3 is genuinely representable: PathStrings.Normalize returns "C:" for input "C:", so new LocalPath("C:") is a real value. It is currently reported as a prefix of C:\Windows, which is wrong.
LocalPath.IsAbsolute is already documented as subject to narrowing to kind 1. When that happens, IsPrefixOf must not simply follow it — it needs the full four-way distinction, so the path kind should be extracted into a separate field or property and matched on there. Both carry a TODO pointing here, and both must be resolved in one change.
Related to #23 (the WIP RelativePath type), but distinct: this is about LocalPath carrying a path kind internally.
- Lingua principale
- C#
- Stelle
- 106
- Fork
- 22
- Merge medio
- 3g 2h
- PR unite (30g)
- 13
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ForNeVeR/TruePath
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ForNeVeR/TruePath#165 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
-
Dependency DashboardApertadashboard
Difficoltà 3/5 1-2 giorni Idoneità per principianti 15/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ForNeVeR/TruePath
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
shimat/opencvsharp#2154 ·
I maintainer di solito rispondono entro 1 giorno
-
subsystem: UI
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Open-Systems-Pharmacology/PK-Sim#3812 ·
I maintainer di solito rispondono entro 1 giorno
-
[C#]:主页联网更新的提示投稿横幅指向错误Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
PCL-Community/PCL-CE#3652 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort:S P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
nightscout/nocturne#2012 ·
I maintainer di solito rispondono entro 1 giorno