diff options
Diffstat (limited to 'src/corelib/io/qfsfileengine_win.cpp')
-rw-r--r-- | src/corelib/io/qfsfileengine_win.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 5b18a85dd4..19343f22ff 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -545,7 +545,7 @@ bool QFSFileEngine::renameOverwrite(const QString &newName) (wchar_t*)d->fileEntry.nativeFilePath().utf16()) != 0; if (!ret) { ret = ::DeleteFile((wchar_t*)QFileSystemEntry(newName).nativeFilePath().utf16()) != 0; - if (ret) + if (ret || ::GetLastError() == ERROR_FILE_NOT_FOUND) ret = ::MoveFile((wchar_t*)d->fileEntry.nativeFilePath().utf16(), (wchar_t*)QFileSystemEntry(newName).nativeFilePath().utf16()) != 0; } |