Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

AbsolutePath.ReadKind reports volume mount points (mounted folders) as junctions

Aperta
#253 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend

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

bug help wanted

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 SubstituteName in the MountPointReparseBuffer. A volume mount point's target starts with \??\Volume{.
  • Decide what a volume mount point should be reported as. FileEntryKind.Directory needs no API change. A new FileEntryKind.MountPoint value 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ForNeVeR/TruePath

Tutte le issue di ForNeVeR/TruePath

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.