mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-04 08:29:50 -04:00
[misc] improve readability of error code handling
* Also don't pass a read size value in WriteFileWithRetry() if we don't use it.
This commit is contained in:
parent
52ca79816f
commit
8a5a5a318a
25 changed files with 257 additions and 252 deletions
|
@ -830,7 +830,7 @@ DWORD RunCommandWithProgress(const char* cmd, const char* dir, BOOL log, int msg
|
|||
UpdateProgressWithInfoInit(NULL, FALSE);
|
||||
while (1) {
|
||||
// Check for user cancel
|
||||
if (IS_ERROR(FormatStatus) && (SCODE_CODE(FormatStatus) == ERROR_CANCELLED)) {
|
||||
if (IS_ERROR(ErrorStatus) && (SCODE_CODE(ErrorStatus) == ERROR_CANCELLED)) {
|
||||
if (!TerminateProcess(pi.hProcess, ERROR_CANCELLED)) {
|
||||
uprintf("Could not terminate command: %s", WindowsErrorString());
|
||||
} else switch (WaitForSingleObject(pi.hProcess, 5000)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue