mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
Fix tmp path in updater
This commit is contained in:
parent
ba29f0ccd1
commit
98fc073f89
@ -387,12 +387,10 @@ bool update_manager::handle_rpcs3(const QByteArray& data, bool auto_accept)
|
|||||||
const std::string orig_path = exe_dir + "rpcs3.exe";
|
const std::string orig_path = exe_dir + "rpcs3.exe";
|
||||||
const std::wstring wchar_orig_path = utf8_to_wchar(orig_path);
|
const std::wstring wchar_orig_path = utf8_to_wchar(orig_path);
|
||||||
|
|
||||||
char temp_path[PATH_MAX];
|
wchar_t wide_temp_path[MAX_PATH + 1]{};
|
||||||
|
GetTempPathW(sizeof(wide_temp_path), wide_temp_path);
|
||||||
|
|
||||||
GetTempPathA(sizeof(temp_path) - 1, temp_path);
|
std::string tmpfile_path = wchar_to_utf8(wide_temp_path);
|
||||||
temp_path[PATH_MAX - 1] = 0;
|
|
||||||
|
|
||||||
std::string tmpfile_path = temp_path;
|
|
||||||
tmpfile_path += "\\rpcs3_update.7z";
|
tmpfile_path += "\\rpcs3_update.7z";
|
||||||
|
|
||||||
fs::file tmpfile(tmpfile_path, fs::read + fs::write + fs::create + fs::trunc);
|
fs::file tmpfile(tmpfile_path, fs::read + fs::write + fs::create + fs::trunc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user