mirror of
https://github.com/reactos/reactos.git
synced 2024-11-01 12:26:32 +00:00
[KERNEL32] GetDriveTypeW: Fix the case with unformatted volumes and volume GUID names
Fix the case when GetDriveTypeW would return DRIVE_NO_ROOT_DIR when it got a volume GUID name and had to access an unformatted volume. Fixes Rufus not being able to find an unformatted volume after writting new MBR.
This commit is contained in:
parent
5c5cd20b9d
commit
32e65f2f8d
|
@ -608,6 +608,9 @@ GetDriveTypeW(IN LPCWSTR lpRootPathName)
|
||||||
return DRIVE_NO_ROOT_DIR;
|
return DRIVE_NO_ROOT_DIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We will work with a device object, so trim the trailing backslash now */
|
||||||
|
PathName.Length -= sizeof(WCHAR);
|
||||||
|
|
||||||
/* Let's probe for it, by forcing open failure! */
|
/* Let's probe for it, by forcing open failure! */
|
||||||
RetryOpen = TRUE;
|
RetryOpen = TRUE;
|
||||||
InitializeObjectAttributes(&ObjectAttributes, &PathName,
|
InitializeObjectAttributes(&ObjectAttributes, &PathName,
|
||||||
|
|
Loading…
Reference in a new issue