Commit c486d877 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Fail more gracefully in GetVolumeInformation for fake drive devices.

parent 47a38c36
...@@ -304,7 +304,10 @@ static enum fs_type VOLUME_ReadFATSuperblock( HANDLE handle, BYTE *buff ) ...@@ -304,7 +304,10 @@ static enum fs_type VOLUME_ReadFATSuperblock( HANDLE handle, BYTE *buff )
/* try a fixed disk, with a FAT partition */ /* try a fixed disk, with a FAT partition */
if (SetFilePointer( handle, 0, NULL, FILE_BEGIN ) != 0 || if (SetFilePointer( handle, 0, NULL, FILE_BEGIN ) != 0 ||
!ReadFile( handle, buff, SUPERBLOCK_SIZE, &size, NULL )) !ReadFile( handle, buff, SUPERBLOCK_SIZE, &size, NULL ))
{
if (GetLastError() == ERROR_BAD_DEV_TYPE) return FS_UNKNOWN; /* not a real device */
return FS_ERROR; return FS_ERROR;
}
if (size < SUPERBLOCK_SIZE) return FS_UNKNOWN; if (size < SUPERBLOCK_SIZE) return FS_UNKNOWN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment