Reactos

[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.

authored by

Adam Słaboń and committed by
Hermès BÉLUSCA - MAÏTO
32e65f2f 5c5cd20b

+3
+3
dll/win32/kernel32/client/file/disk.c
··· 608 608 return DRIVE_NO_ROOT_DIR; 609 609 } 610 610 611 + /* We will work with a device object, so trim the trailing backslash now */ 612 + PathName.Length -= sizeof(WCHAR); 613 + 611 614 /* Let's probe for it, by forcing open failure! */ 612 615 RetryOpen = TRUE; 613 616 InitializeObjectAttributes(&ObjectAttributes, &PathName,