diff options
Diffstat (limited to 'src/corelib/io/qfile.cpp')
-rw-r--r-- | src/corelib/io/qfile.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 01a236c..4a20c97 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -743,10 +743,12 @@ QFile::rename(const QString &newName) error = true; } } - if (error) + if (error) { out.remove(); - else + } else { + fileEngine()->setFileName(newName); setFileName(newName); + } return !error; } } |