diff options
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfile.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index d7da800..04750b0 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -708,6 +708,7 @@ QFile::rename(const QString &newName) d->setError(QFile::RenameError, tr("Destination file exists")); return false; } + unsetError(); close(); if(error() == QFile::NoError) { if (fileEngine()->rename(newName)) { @@ -849,6 +850,7 @@ QFile::copy(const QString &newName) d->setError(QFile::CopyError, tr("Destination file exists")); return false; } + unsetError(); close(); if(error() == QFile::NoError) { if(fileEngine()->copy(newName)) { @@ -908,6 +910,7 @@ QFile::copy(const QString &newName) out.setAutoRemove(false); #endif } + close(); } if(!error) { QFile::setPermissions(newName, permissions()); |