Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.6.2
-
None
-
Windows 10
-
fe5edcee602f0ab2912bbdd1a21f4309ed7dbfd6 (qtbase/5.11, 14.2.2018, 5.11), f8cbde9b0afd427d25017b46209c3119c8919e5e (qtbase/5.9, 14.5.2018, 5.9.7)
Description
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:
https://sourceforge.net/p/texstudio/bugs/1933/
https://sourceforge.net/p/texstudio/discussion/907840/thread/64cd1328/
See src\corelib\io\qtemporaryfile.cpp:209 createFileFromTemplate() FILE_SHARE_WRITE
Attachments
Issue Links
- relates to
-
QTBUG-76228 QSaveFile unable to open UNC path to write on Windows
- Closed
-
QTBUG-122208 Randomly getting "Access is denied" error when saving files with QSaveFile.
- Closed