mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 00:54:40 +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
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue