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

Unclear behaviour of QTemporaryFile::rename()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.1, 6.9.0 Beta1
    • Core: I/O, Documentation
    • None
    • 1

    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:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change