AbsolutePath.ReadKind reports volume mount points (mounted folders) as junctions
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C#
- Star
- 109
- Fork
- 26
- Merge trung bình
- 5 ngày 23 phút
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ForNeVeR/TruePath
-
DiskUtils.GetWindowsRealPathByHandle retries GetFinalPathNameByHandle after a hard failure and ignores the required buffer sizeCó thể đã có người làm @hamdiakin đã nhận 1 ngày trước. Đang mởenhancement help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ForNeVeR/TruePath#252 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ForNeVeR/TruePath#165 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 5 ngày
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 5 ngày
-
Dependency DashboardĐang mởdashboard
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của ForNeVeR/TruePath
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement no-stack-trace
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
greenshot/greenshot#1618 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
squad/utforming status/triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Altinn/altinn-studio#21565 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Tyrrrz/YoutubeDownloader#912 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày