mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-31 06:48:26 -04:00
[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:
parent
aeae66e971
commit
9d7e96e293
10 changed files with 47 additions and 28 deletions
|
@ -6,7 +6,7 @@
|
|||
*
|
||||
* See also: https://utf8everywhere.org
|
||||
*
|
||||
* Copyright © 2010-2020 Pete Batard <pete@akeo.ie>
|
||||
* Copyright © 2010-2021 Pete Batard <pete@akeo.ie>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -642,6 +642,19 @@ static __inline UINT GetSystemWindowsDirectoryU(char* lpBuffer, UINT uSize)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static __inline BOOL SHGetSpecialFolderPathU(HWND hwnd, char* pszPath, int csidl, BOOL fCreate)
|
||||
{
|
||||
BOOL ret;
|
||||
DWORD err = ERROR_INVALID_DATA;
|
||||
// pszPath is at least MAX_PATH characters in size
|
||||
WCHAR wpszPath[MAX_PATH] = { 0 };
|
||||
ret = SHGetSpecialFolderPathW(hwnd, wpszPath, csidl, fCreate);
|
||||
err = GetLastError();
|
||||
wchar_to_utf8_no_alloc(wpszPath, pszPath, MAX_PATH);
|
||||
SetLastError(err);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static __inline DWORD GetTempPathU(DWORD nBufferLength, char* lpBuffer)
|
||||
{
|
||||
DWORD ret = 0, err = ERROR_INVALID_DATA;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue