diff options
author | David Faure <faure+bluesystems@kde.org> | 2013-03-22 11:08:01 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-22 13:29:13 +0100 |
commit | ab340e89fdf15639e062313815fc7c534676c23c (patch) | |
tree | f4fffda992b099c3930cf25b71ab389b71f6ee7a /src/corelib/io/qfsfileengine_win.cpp | |
parent | 98e704a2da8f8537291efc120e1bc6ec23901657 (diff) |
renameOverwrite: don't allow cross-partition copying
This matches the Unix behavior, and ensures atomicity (as required by QSaveFile)
Change-Id: I54ec98bcd7a0714ca968cad627a5e4d684fd7af6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
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 23ab507dad..41526d1eac 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -522,7 +522,7 @@ bool QFSFileEngine::renameOverwrite(const QString &newName) Q_D(QFSFileEngine); bool ret = ::MoveFileEx((wchar_t*)d->fileEntry.nativeFilePath().utf16(), (wchar_t*)QFileSystemEntry(newName).nativeFilePath().utf16(), - MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED) != 0; + MOVEFILE_REPLACE_EXISTING) != 0; if (!ret) setError(QFile::RenameError, QSystemError(::GetLastError(), QSystemError::NativeError).toString()); return ret; |