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

QLockFile of size 0

    XMLWordPrintable

Details

    • dd06d036616b3f3de852ea51989d9b4944417c1c

    Description

      It seems to be possible to create a lockfile of size 0 which is not deleted in the constructor:

      In QLockFilePrivate::tryLock_sys() qt_safe_open can succeed and the subsequent can qt_write_loop can fail. As a result t->isLocked will stay at 'false' (that's correct), but the 'unlock' in the destructor will return early without removing the empty file.

      I believe in addition to the "error = QLockFile::UnknownError; // partition full" line there should be QFile::remove(d->fileName) or similar to clean up.

      Attachments

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

        Activity

          People

            dfaure David Faure (Private)
            hjk hjk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes