summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfile.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-05-13 15:13:48 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-05-22 12:33:40 (GMT)
commitfd7cb7faa765835de6e7beb24f018c417d9ad7d8 (patch)
tree80d7c22e8369aac8cb94210fddc7b309cfebf975 /src/corelib/io/qfile.cpp
parentf1e9c0f3d22d611bfaa14c30a34e6042500a0cb8 (diff)
downloadQt-fd7cb7faa765835de6e7beb24f018c417d9ad7d8.zip
Qt-fd7cb7faa765835de6e7beb24f018c417d9ad7d8.tar.gz
Qt-fd7cb7faa765835de6e7beb24f018c417d9ad7d8.tar.bz2
QFile::copy: close source file when using fallback mechanism
Also added check in test case for rename fallback. Task-number: 165920 Reviewed-by: Thiago
Diffstat (limited to 'src/corelib/io/qfile.cpp')
-rw-r--r--src/corelib/io/qfile.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index d3cee9a..a0bd8b4 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -914,6 +914,7 @@ QFile::copy(const QString &newName)
out.setAutoRemove(false);
#endif
}
+ close();
}
if(!error) {
QFile::setPermissions(newName, permissions());