diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-07-11 09:48:07 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-11 10:56:49 +0200 |
commit | 001b80305addc5e47a1c80f6629a757178d95c81 (patch) | |
tree | fffe5dfa971fe57f2c54865fe703ddac8a526b76 /src | |
parent | 5ec3b2826b3f4c80adc3ed8f5aa290e6c1a2f2ec (diff) |
QDir::mkpath shouldn't fail if parent directory denies access
The fix for QTBUG-30046 introduced this regression on Windows, which
meant that it became impossible to create a directory anywhere under
c:\Users for example, because each user only has permission to see
his own directory.
Task-number: QTBUG-32314
Change-Id: I1b35433265934d4978d4b0c23a946c3f920c710d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qfilesystemengine_win.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index 2c9ed9da3d..e8904b0ab7 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -1049,7 +1049,8 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea if (slash) { QString chunk = dirName.left(slash); if (!mkDir(chunk)) { - if (GetLastError() == ERROR_ALREADY_EXISTS) { + const DWORD lastError = GetLastError(); + if (lastError == ERROR_ALREADY_EXISTS || lastError == ERROR_ACCESS_DENIED) { bool existed = false; if (isDirPath(chunk, &existed) && existed) continue; |