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

Unclear behaviour of QTemporaryFile::rename()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.11.0 FF
    • 6.8.1, 6.9.0 Beta1
    • Core: I/O, Documentation
    • None
    • 1
    • 569928b64 (dev), 2089164ed (6.10), 03a1ba769 (6.9), c22c344f2 (dev), 1a8742743 (tqtc/lts-6.8), b9195d3f3 (tqtc/lts-6.5)
    • Foundation Sprint 132, Foundation Sprint 133, Foundation Sprint 134, Foundation Sprint 135

    Description

      The documentation of QTemporaryFile::rename() (https://doc.qt.io/qt-6/qtemporaryfile.html#rename) neglects to say whether the function will overwrite the target, if it exists.

      It seems it doesn't (implementation calls QTemporaryFileEngine::rename(), not renameOverwrite()), making this function rather useless, seeing as it's the only public Qt API I know that guarantees an atomic rename of a file at the OS level.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-132617
          # Subject Branch Project Status CR V

          Activity

            People

              mmutz Marc Mutz
              mmutz Marc Mutz
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews