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

QFile::rename overwrites files on usb flash drives without warning

    XMLWordPrintable

Details

    • Windows
    • 163a0475ebf403fd39f7a7cc764119b40664da1d (qt/qtbase/5.12)

    Description

      The behavior of QFile::rename is inconsistent when used on a file in USB flash drive and when used on a file in local HDD.

      Behavior on local hdd:

      • If a file with the new name exists, returns false and nothing will be done

      Behavior on usb flash drive:

      • If a file with the new name exists, returns true and overwrites the existing file without a warning

      Steps to reproduce:

      • Run the attached project
      • Select a test directory on usb flash drive
      • Select a test directory on local hdd
      • Click "Run test". (Creates 2 empty sample files on both target directories and attempts to overwrite one with the other using QFile::rename)

      Attachments

        1. fileoverwrite-test.zip
          3 kB
        2. qtbug74759_diag.diff
          5 kB
        3. qtbug74759.zip
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            miikapernu Miika Pernu
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes