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

QDir::mkpath regression

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.2.0 Alpha
    • Core: I/O
    • None
    • Windows 8.1

      This bug is not fixed in 5.2.0:
      https://bugreports.qt-project.org/browse/QTBUG-32314

      Simply try this, it will fail:
      Q_ASSERT(QDir().mkpath(QLatin1String("C:
      Users")));

      It is easy to track the problem: the Qt implementation relies on GetLastError, but this Microsoft API has a bug, as mentionned there:
      http://stackoverflow.com/questions/3570618/what-causes-createdirectory-to-return-error-access-denied

      Hence the Qt implementation fails.
      Qt code:
      qtbase\src\corelib\io\qfilesystemengine_win.cpp
      function:
      QFileSystemEngine::createDirectory

      I suggest to revert to the previous Qt implementation.

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

            laknoll Lars Knoll
            jirauser26727 user-04d21 (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes