diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-04-30 07:11:49 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-04-30 07:11:49 (GMT) |
commit | 6b7b289ef47c4e8300a1f5a9ba86044b890a1014 (patch) | |
tree | b640a4ade634d668ce1a7a5d1f15c2b2b822eee4 | |
parent | 2ac2bca63ad0743a52ee946c5fae06d548b93d68 (diff) | |
download | Qt-6b7b289ef47c4e8300a1f5a9ba86044b890a1014.zip Qt-6b7b289ef47c4e8300a1f5a9ba86044b890a1014.tar.gz Qt-6b7b289ef47c4e8300a1f5a9ba86044b890a1014.tar.bz2 |
Fixed bug in QTemporaryFile::rename.
The nativeInitFileName of file engine was not set in rename fallback
case. Now it is set by calling: fileEngine()->setFileName
This error was found with QNetworkDiskCache test case.
-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; } } |