Skip to content

Conversation

@compnerd
Copy link
Member

GetVolumeInformationW is documented as taking the root directory of
the volume to describe as lpRootPathName. We attempt to compute the
location by determining the volume mount point where the specified
path is mounted. However, GetVolumePathNameW does always return the
path to the volume mount point, which is the root of the volume where
the specified path. With a path substitution that is not rooted at a
volume root, the volume root with a relative path. As we need to get
to the root, force the stripping to the root via PathCchStripToRoot.

This should repair the
TestFoundation.TestFileManager/test_filesystemAttributes on Windows.

`GetVolumeInformationW` is documented as taking the root directory of
the volume to describe as `lpRootPathName`. We attempt to compute the
location by determining the volume mount point where the specified
path is mounted. However, `GetVolumePathNameW` does always return the
path to the volume mount point, which is the root of the volume where
the specified path.  With a path substitution that is not rooted at a
volume root, the volume root with a relative path. As we need to get
to the root, force the stripping to the root via `PathCchStripToRoot`.

This should repair the
TestFoundation.TestFileManager/test_filesystemAttributes on Windows.
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd compnerd merged commit 08f2025 into swiftlang:main Aug 15, 2021
@compnerd compnerd deleted the rooted branch August 15, 2021 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant