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

QDir::mkpath regression, Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.1.1
    • 5.1.0
    • Core: I/O
    • None
    • 001b80305addc5e47a1c80f6629a757178d95c81 fixes it for 5.1.1, 73e3d2f6cb002be4ce409c3738db74b61beb12f4 is an additional cleanup for custom allocators

    Description

      The patch for QTBUG-30046 killed mkpath for Windows as soon as any part of the directory you want to create already exists but you have no permissions.

      See comment on the old issue:

      I think that change killed mkpath for Windows as soon as there is any directory on the way to the one you want to create that already exists but for which you have no permissions to create it.
      In some rare cases, Windows reports then ERROR_ACCESS_DENIED, instead of ERROR_ALREADY_EXISTS.
      The old code had no problem, as the directory part did exist and only that was checked first and no mkDir was tried.
      Now it will just fail, making mkpath even for stuff in C:\Users\<xxx> unusable per default, e.g. our application can't create its local data dirs.
      Hints that ERROR_ACCESS_DENIED can happen:
      http://stackoverflow.com/questions/3570618/what-causes-createdirectory-to-return-error-access-denied
      http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/57f8ef8d-87ad-455b-8ed9-9a0d88bae960/createdirectory-returns-erroraccessdenied-on-vista-with-uac-enabled
      This should be a known issue for 5.1, as a lot of stuff won't work that way.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              cullmann Christoph Cullmann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes