mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Sync the config file replacement to disk before renaming
Hopefully, this fixes player's incomplete config issues.
This commit is contained in:
parent
4d90119f25
commit
a51875f9b6
|
@ -110,6 +110,11 @@ bool CConfigManager::Save()
|
||||||
for(int i = 0; i < m_NumCallbacks; i++)
|
for(int i = 0; i < m_NumCallbacks; i++)
|
||||||
m_aCallbacks[i].m_pfnFunc(this, m_aCallbacks[i].m_pUserData);
|
m_aCallbacks[i].m_pfnFunc(this, m_aCallbacks[i].m_pUserData);
|
||||||
|
|
||||||
|
if(io_sync(m_ConfigFile) != 0)
|
||||||
|
{
|
||||||
|
m_Failed = true;
|
||||||
|
}
|
||||||
|
|
||||||
if(io_close(m_ConfigFile) != 0)
|
if(io_close(m_ConfigFile) != 0)
|
||||||
m_Failed = true;
|
m_Failed = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue