LocalPath: prefix matching needs a four-way path kind, not IsPathRooted
メンテナーはふだん 1 日以内に返信
@ForNeVeR がすでに取り組んでいます。
2026年9月21日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- csharp
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C#
- スター
- 107
- フォーク
- 22
- 平均マージ
- 3日 2時間
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ForNeVeR/TruePath のほかの issue
-
enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ForNeVeR/TruePath#165 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
`path.GetFiles(LocalPathPattern)`対応中かも @hamdiakin が 4 日前に担当しました。 オープンenhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
ForNeVeR/TruePath#202 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Dependency Dashboardオープンdashboard
難易度 3/5 1〜2日 初心者へのやさしさ 15/100
メンテナーはふだん 1 日以内に返信
ForNeVeR/TruePath の issue をすべて見る
似ている issue
-
VideoViewer: rotated (portrait phone) videos shown sideways when system decimal separator is a commaオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Volodymyr-Petrunin/Bankomaten#45 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AvaloniaUI/Avalonia#22420 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
dotnet/SqlClient#4823 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
type/automation type/tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信