summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-07-31 15:18:43 +0800
committerLéo Lam <leo@innovatetechnologi.es>2017-07-31 15:18:43 +0800
commitb5e7c417ff8d0ef8c9dea2eb7533fdcd87aeb2ae (patch)
tree70366d441834f14b45fff05100561cd356f34ed5 /Source
parent141fb0f03ca4e0d05f7ccbf3e020997097f60dbe (diff)
SysConf: Fix writing a new SYSCONF
On Windows, File::GetTempFilenameForAtomicWrite returns a path somewhere in C:\Users\XXX\AppData\Local\Temp\{UUID here}\ in which all writes just fail. Just use the SYSCONF path + ".tmp" for the temporary file name.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Common/SysConf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Common/SysConf.cpp b/Source/Core/Common/SysConf.cpp
index 422bbb3f2e..2f86379462 100644
--- a/Source/Core/Common/SysConf.cpp
+++ b/Source/Core/Common/SysConf.cpp
@@ -197,7 +197,7 @@ bool SysConf::Save() const
std::copy(footer.cbegin(), footer.cend(), buffer.end() - footer.size());
// Write the new data.
- const std::string temp_file = File::GetTempFilenameForAtomicWrite(m_file_name);
+ const std::string temp_file = m_file_name + ".tmp";
File::CreateFullPath(temp_file);
{
File::IOFile file(temp_file, "wb");