Commit 08f2025
authored
FileManager: correct API misuse on Windows (#3049)
`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.1 parent 97da7f6 commit 08f2025
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
272 | 277 | | |
273 | 278 | | |
274 | 279 | | |
| |||
0 commit comments