AbsolutePath.ReadKind reports volume mount points (mounted folders) as junctions
I maintainer di solito rispondono entro 5 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C#
- Stelle
- 109
- Fork
- 26
- Merge medio
- 5g 23m
- PR unite (30g)
- 10
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
-
DiskUtils.GetWindowsRealPathByHandle retries GetFinalPathNameByHandle after a hard failure and ignores the required buffer sizeForse già presa @hamdiakin l’ha presa 1 giorno fa. Apertaenhancement help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ForNeVeR/TruePath#252 · 1 commento ·
I maintainer di solito rispondono entro 5 giorni
-
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 5 giorni
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 5 giorni
-
enhancement help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 5 giorni
-
Dependency DashboardApertadashboard
Difficoltà 3/5 1-2 giorni Idoneità per principianti 15/100
I maintainer di solito rispondono entro 5 giorni
Tutte le issue di ForNeVeR/TruePath
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement no-stack-trace
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
greenshot/greenshot#1618 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
squad/utforming status/triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Altinn/altinn-studio#21565 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
Tyrrrz/YoutubeDownloader#912 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno