mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Hopefully fix moving config file on save on Windows by allowing overwrite
This commit is contained in:
parent
0f425986f9
commit
74391e63b9
|
@ -1743,7 +1743,7 @@ int fs_remove(const char *filename)
|
||||||
int fs_rename(const char *oldname, const char *newname)
|
int fs_rename(const char *oldname, const char *newname)
|
||||||
{
|
{
|
||||||
#if defined(CONF_FAMILY_WINDOWS)
|
#if defined(CONF_FAMILY_WINDOWS)
|
||||||
if(MoveFile(oldname, newname) != 0)
|
if(MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
#else
|
#else
|
||||||
if(rename(oldname, newname) != 0)
|
if(rename(oldname, newname) != 0)
|
||||||
|
|
Loading…
Reference in a new issue