mirror of
https://github.com/reactos/reactos.git
synced 2026-05-28 20:03:01 +08: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:
committed by
Hermès BÉLUSCA - MAÏTO
parent
5c5cd20b9d
commit
32e65f2f8d
@@ -608,6 +608,9 @@ GetDriveTypeW(IN LPCWSTR lpRootPathName)
|
||||
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! */
|
||||
RetryOpen = TRUE;
|
||||
InitializeObjectAttributes(&ObjectAttributes, &PathName,
|
||||
|
||||
Reference in New Issue
Block a user