-
Type:
Bug
-
Status: Closed
-
Priority:
P3: Somewhat important
-
Resolution: Done
-
Affects Version/s: 5.6.2
-
Fix Version/s: 5.11.0 Alpha
-
Component/s: Core: I/O
-
Labels:None
-
Environment:Windows 10
-
Commits:fe5edcee602f0ab2912bbdd1a21f4309ed7dbfd6 (qtbase/5.11, 14.2.2018, 5.11), f8cbde9b0afd427d25017b46209c3119c8919e5e (qtbase/5.9, 14.5.2018, 5.9.7)
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
- relates to
-
QTBUG-76228 QSaveFile unable to open UNC path to write on Windows
-
- Reported
-
For Gerrit Dashboard: QTBUG-57299 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
218033,4 | Windows/QSaveFile: Fix locking issues on Dropbox drives | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |
224800,2 | Windows/QSaveFile: Fix locking issues on Dropbox drives | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |