mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-29 14:05:22 -04:00
[iso] fix crash when opening Windows ISOs
* Closes #1268
* Issue was introduced in 521034da99
and has
to do with VS2017's handling of static strings in RELEASE mode.
Fix is to use a static char array instead.
* Also fix MinGw build warnings and increase process search timeout
This commit is contained in:
parent
326ae54f45
commit
f98c243eb8
5 changed files with 12 additions and 11 deletions
|
@ -172,7 +172,7 @@ static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWr
|
|||
bWriteShare = TRUE;
|
||||
// Try to report the process that is locking the drive
|
||||
// We also use bit 6 as a flag to indicate that SearchProcess was called.
|
||||
access_mask = SearchProcess(DevPath, 5000, TRUE, TRUE, FALSE) | 0x40;
|
||||
access_mask = SearchProcess(DevPath, SEARCH_PROCESS_TIMEOUT, TRUE, TRUE, FALSE) | 0x40;
|
||||
}
|
||||
Sleep(DRIVE_ACCESS_TIMEOUT / DRIVE_ACCESS_RETRIES);
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWr
|
|||
uprintf("Could not lock access to %s: %s", Path, WindowsErrorString());
|
||||
// See if we can report the processes are accessing the drive
|
||||
if (!IS_ERROR(FormatStatus) && (access_mask == 0))
|
||||
access_mask = SearchProcess(DevPath, 5000, TRUE, TRUE, FALSE);
|
||||
access_mask = SearchProcess(DevPath, SEARCH_PROCESS_TIMEOUT, TRUE, TRUE, FALSE);
|
||||
// Try to continue if the only access rights we saw were for read-only
|
||||
if ((access_mask & 0x07) != 0x01)
|
||||
safe_closehandle(hDrive);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue