When trying to commit() a QSaveFile in a dropbox folder, the operation often fails. In this case, a temporary file remains and
- file.error() returns 10
- file.errorString() returns "The process cannot access the file because it is being used by another process."
This bug has two parts:
1) The commit() failure itself. Pausing Dropbox fixes the issue. Therefore it may be that dropbox is simply blocking the file and Qt cannot do anything about it. Still it would be nice if there was a solution.
2) According to the documentation of QSaveFile::commit(): "If an error happened during writing, deletes the temporary file and returns false."
The deletion of the temporary file is not happening.
For reference, this bug was seen by a number of our users:
See src\corelib\io\qtemporaryfile.cpp:209 createFileFromTemplate() FILE_SHARE_WRITE