diff options
author | João Abecasis <joao@trolltech.com> | 2010-01-12 18:14:56 (GMT) |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-01-14 17:48:55 (GMT) |
commit | 2d0bd1a13328d5a5ed6c4d1e768937a6627f1086 (patch) | |
tree | 7b9be549e8e6fec944d0519779eb7b4b529b6a5f /src/corelib/io | |
parent | 88a07b4c0a3a87eeb47750640cb71a5a64e0573c (diff) | |
download | Qt-2d0bd1a13328d5a5ed6c4d1e768937a6627f1086.zip Qt-2d0bd1a13328d5a5ed6c4d1e768937a6627f1086.tar.gz Qt-2d0bd1a13328d5a5ed6c4d1e768937a6627f1086.tar.bz2 |
QFile::remove: don't fail for unrelated errors
remove was checking for errors from close, but without clearing the
error state beforehand it ended picking unrelated errors.
Task-number: QTBUG-7285
Reviewed-by: qCaro
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfile.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 6395cc7..4c7f3f0 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -643,6 +643,7 @@ QFile::remove() qWarning("QFile::remove: Empty or null file name"); return false; } + unsetError(); close(); if(error() == QFile::NoError) { if(fileEngine()->remove()) { |