Fix bug with replacing executables.

This commit is contained in:
Learath Lea 2015-03-08 19:45:37 +02:00
parent fd4b9d1f06
commit a4d16a2713

View file

@ -104,6 +104,7 @@ void CAutoUpdate::ReplaceExecutable()
dbg_msg("autoupdate", "Replacing" PLAT_CLIENT_EXEC);
//Replace running executable by renaming twice...
m_pStorage->RemoveFile("DDNet.old", 2);
m_pStorage->RenameFile(PLAT_CLIENT_EXEC, "DDNet.old", 2);
m_pStorage->RenameFile("DDNet.tmp", PLAT_CLIENT_EXEC, 2);
}