mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-27 21:24:17 -04:00
[core] fix elimination of card readers that contain no media
* Closes #400
This commit is contained in:
parent
e8b6d70fb8
commit
703e169a8c
2 changed files with 7 additions and 7 deletions
|
@ -561,7 +561,7 @@ BOOL IsMediaPresent(DWORD DriveIndex)
|
|||
|
||||
hPhysical = GetPhysicalHandle(DriveIndex, FALSE, FALSE);
|
||||
r = DeviceIoControl(hPhysical, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX,
|
||||
NULL, 0, geometry, sizeof(geometry), &size, NULL) || (size <= 0);
|
||||
NULL, 0, geometry, sizeof(geometry), &size, NULL) && (size > 0);
|
||||
safe_closehandle(hPhysical);
|
||||
return r;
|
||||
}
|
||||
|
@ -716,7 +716,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
|
|||
}
|
||||
|
||||
#if defined(__GNUC__)
|
||||
// GCC 4.9 bug us about the fact that MS defined an expandable array as array[1]
|
||||
// GCC 4.9 bugs us about the fact that MS defined an expandable array as array[1]
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
#endif
|
||||
switch (DriveLayout->PartitionStyle) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue