Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57299

QSaveFile failure in dropbox folder

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.0 Alpha
    • 5.6.2
    • Core: I/O
    • 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

        1. 5Screenshot-ProcessInternals.png
          5Screenshot-ProcessInternals.png
          214 kB
        2. dropbox_ads_lock.png
          dropbox_ads_lock.png
          165 kB
        3. krita-bug394376_capture.pml.zip
          2.83 MB
        4. qtbug57299_diag.diff
          6 kB
        5. qtbug57299.zip
          3 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kleint Friedemann Kleint
              thoffmann Tim Hoffmann
              Votes:
              11 Vote for this issue
              Watchers:
              21 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes