mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-21 18:22:33 +01:00
Conserve error value when trying to open log file
This commit is contained in:
parent
c89ad38ef1
commit
a32f979814
@ -332,6 +332,8 @@ logs::file_writer::file_writer(const std::string& name)
|
||||
if (!m_file.open(buf_name, fs::read + fs::rewrite + fs::lock))
|
||||
{
|
||||
#ifdef _WIN32
|
||||
auto prev_error = fs::g_tls_error;
|
||||
|
||||
if (fs::exists(s_filelock))
|
||||
{
|
||||
// A restart is happening, wait for the file to be accessible
|
||||
@ -342,6 +344,10 @@ logs::file_writer::file_writer(const std::string& name)
|
||||
tries++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fs::g_tls_error = prev_error;
|
||||
}
|
||||
|
||||
if (!m_file)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user