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

QFile does not really truncate file on open on UWP.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.12.3
    • Fix Version/s: 5.12.5, 5.13.1, 5.14.0 Alpha
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      WinRT
    • Commits:
      3fbb6a957227968951283107813271218058b719 (qt/qtbase/5.12)

      Description

      • The following code snippet will try to overwrite an exist file, the result is that the old data won't be cleared. It doesn't work on UWP at least.

      QFile file(filePath);

      file.open(QFile::WriteOnly | QFile::Truncate);

        Attachments

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

          Activity

            People

            • Assignee:
              owolff Oliver Wolff
              Reporter:
              bugman Vico Liang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes