[core] move downloads from <app_location>\rufus_files\ to %LOCALAPPDATA%\Rufus\

* While this is intended to solve the issue of saving GRUB/Syslinux files for the
  App Store version, we apply this change globally, as it allows the user to move
  the Rufus executable around while preserving access to existing downloads.
* Closes #1744
This commit is contained in:
Pete Batard 2021-05-31 16:54:11 +01:00
parent aeae66e971
commit 9d7e96e293
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
10 changed files with 47 additions and 28 deletions

View file

@ -2,7 +2,7 @@
* Rufus: The Reliable USB Formatting Utility
* Standard User I/O Routines (logging, status, error, etc.)
* Copyright © 2020 Mattiwatti <mattiwatti@gmail.com>
* Copyright © 2011-2020 Pete Batard <pete@akeo.ie>
* Copyright © 2011-2021 Pete Batard <pete@akeo.ie>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -650,11 +650,11 @@ const char *WindowsErrorString(void)
&err_string[presize], sizeof(err_string)-(DWORD)strlen(err_string), NULL);
if (size == 0) {
format_error = GetLastError();
if ((format_error) && (format_error != 0x13D)) // 0x13D, decode error, is returned for unknown codes
if ((format_error) && (format_error != ERROR_MR_MID_NOT_FOUND) && (format_error != ERROR_MUI_FILE_NOT_LOADED))
static_sprintf(err_string, "Windows error code 0x%08lX (FormatMessage error code 0x%08lX)",
error_code, format_error);
else
static_sprintf(err_string, "Unknown error 0x%08lX", error_code);
static_sprintf(err_string, "Windows error code 0x%08lX", error_code);
} else {
// Microsoft may suffix CRLF to error messages, which we need to remove...
assert(presize > 2);