Delete temporary file if copy was unsuccessful
commit57ec397f66e611c7802c8cdbb8a0232b91ac78f5
authorJoão Abecasis <joao@abecasis.name>
Thu, 2 Apr 2009 09:15:03 +0000 (2 11:15 +0200)
committerJoão Abecasis <joao@abecasis.name>
Thu, 2 Apr 2009 14:29:48 +0000 (2 16:29 +0200)
tree785cc36656fd23b2f6a344ad2c5619e029a4b0f7
parent8d50038174faf315a389010af3a680d865f6843a
Delete temporary file if copy was unsuccessful

This is an untested bugfix -- comes solely from reading the code.

In QFile::copy's fallback implementation a (temporary) file is created
for block copying from the source file. When Qt is built without
temporary file support this doesn't seem to be deleted in case of an
error while block copying or renaming to the final destination.

Reviewed-by: mariusSO
src/corelib/io/qfile.cpp