AbsolutePath.ReadKind reports volume mount points (mounted folders) as junctions
メンテナーはふだん 5 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with AbsolutePath.ReadKind() in TruePath/AbsolutePath.cs and DiskUtils.IsJunction in TruePath/DiskUtils.cs, then review issue #242 for the related reparse buffer parsing work. Reproduce with a Windows volume mount point and inspect how its SubstituteName differs from a directory junction. Done means volume mount points are classified according to the chosen FileEntryKind behavior while directory junctions keep their existing classification.
索引モデルが issue の本文から書いたものです。
説明
On Windows, AbsolutePath.ReadKind() returns FileEntryKind.Junction whenever DiskUtils.IsJunction sees the reparse tag IO_REPARSE_TAG_MOUNT_POINT.
But NTFS uses that same tag for two different things:
- directory junctions, where the target is a directory path, e.g.
\??\C:\Some\Dir; - volume mount points ("mounted folders", created via Disk Management or
mountvol), where the target is a volume, e.g.\??\Volume{GUID}\.
See Reparse Point Tags and Creating Mounted Folders.
So a folder with a whole volume mounted on it is reported as a Junction, although it's not a link to another directory: it's the root of another file system.
Repro (requires an elevated shell and a spare volume, e.g. a VHD):
mkdir C:\Mnt
mountvol C:\Mnt \\?\Volume{<guid>}\ # take the GUID from `mountvol` output
new AbsolutePath(@"C:\Mnt").ReadKind(); // FileEntryKind.Junction
Recommendations
- Tell the two apart by the
SubstituteNamein theMountPointReparseBuffer. A volume mount point's target starts with\??\Volume{. - Decide what a volume mount point should be reported as.
FileEntryKind.Directoryneeds no API change. A newFileEntryKind.MountPointvalue is more precise, but it is a public API addition. - This needs tag-specific parsing of the reparse buffer, which ties in with #242.
- 主要言語
- C#
- スター
- 109
- フォーク
- 26
- 平均マージ
- 5日 23分
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ForNeVeR/TruePath のほかの issue
-
DiskUtils.GetWindowsRealPathByHandle retries GetFinalPathNameByHandle after a hard failure and ignores the required buffer size対応中かも @hamdiakin が 1 日前に担当しました。 オープンenhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ForNeVeR/TruePath#252 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ForNeVeR/TruePath#165 · コメント 2 件 ·
メンテナーはふだん 5 日以内に返信
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 5 日以内に返信
-
enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 5 日以内に返信
-
Dependency Dashboardオープンdashboard
難易度 3/5 1〜2日 初心者へのやさしさ 15/100
メンテナーはふだん 5 日以内に返信
ForNeVeR/TruePath の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
README says main uses .NET 9 while the current branch targets .NET 10対応中かも @dajiaohuang が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
ardalis/CleanArchitecture#1098 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
madeyoga/AuthEndpoints#365 ·
メンテナーはふだん 1 日以内に返信
-
ConnectionOpened reports pre-redirect URL when OnConnectingAsync changes the target対応中かも @akashchamp が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
majorsilence/Reporting#493 ·
メンテナーはふだん 1 日以内に返信