Hopefully fix moving config file on save on Windows by allowing overwrite

This commit is contained in:
def 2015-07-28 02:12:05 +02:00
parent 0f425986f9
commit 74391e63b9

View file

@ -1743,7 +1743,7 @@ int fs_remove(const char *filename)
int fs_rename(const char *oldname, const char *newname)
{
#if defined(CONF_FAMILY_WINDOWS)
if(MoveFile(oldname, newname) != 0)
if(MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED) != 0)
return 1;
#else
if(rename(oldname, newname) != 0)