Incorrect handling of NTFS Reparse points to volumes #75
Labels
available on master
Fix is done on master branch, issue closed on next release
bug
Something isn't working
Windows
Windows platform is affected
Milestone
Describe the bug
exists()
returns false when given a path to an NTFS reparse point that points to a volume.Additionally,
status()
returnsnot_found
for such path.To Reproduce
In Disk Manager, format a new volume. Instead of assigning a drive-letter, assign a mount-point at an empty directory on an NTFS volume.
Call
exists()
and pass in the path to the mount point.Observe it returning false, even though the volume exists and is mounted.
Expected behavior
exists()
is expected to returntrue
.Additional context
The problem arises from resolving a "symlink", in status_ex. The symlink being an
IO_REPARSE_TAG_MOUNT_POINT
is handled here.The symlink resolves to something of this form: "\??\Volume{<GUID>}". This path is correct. However, it's assigned into a
path
object (result =
). Thepath
assign()
member function will strip the\??\
prefix, which makes the path incorrect.Recursing down into another call to
status_ex()
(here) will then fail saying the path doesn't exist (because it doesn't).Removing the code that's stripping the prefix fixes the problem:
However, that is likely introducing other issues. Perhaps the best solution would be to have a
resolveLink
return a plain native sting (instead ofpath
) and also makestatus_ex()
accept a plain string, to avoid round-tripping viapath
in this case.The text was updated successfully, but these errors were encountered: