diff options
author | Kai Koehne <kai.koehne@digia.com> | 2013-06-19 12:32:45 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-24 14:51:53 +0200 |
commit | 74ca6034e413dc7ae8203d8eef1264357023d8af (patch) | |
tree | 70ddeff116d80f23cccc3e5b3b8f32a7b2fda4c5 | |
parent | d0d158f0921fbcc67ac33eedc69684c1b3b389a7 (diff) | |
download | qtbase-74ca6034e413dc7ae8203d8eef1264357023d8af.tar.gz |
Fix QDir::mkpath failing for drive paths on Windows
This fixes a regression introduced in 3e2cd8ef6f1ce4f467. We shouldn't try
to call mkdir for just a drive letter.
Task-number: QTBUG-31862
Change-Id: I56035857aec03f9f1cceef62e82f372486b7737b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
-rw-r--r-- | src/corelib/io/qfilesystemengine_win.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index fdbd6e01e4..2c9ed9da3d 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -1034,6 +1034,10 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea } if (oldslash != -1) oldslash = dirName.indexOf(QDir::separator(), oldslash); + } else if (dirName.size() > 2 + && dirName.at(1) == QLatin1Char(':')) { + // Don't try to call mkdir with just a drive letter + oldslash = 2; } for (int slash=0; slash != -1; oldslash = slash) { slash = dirName.indexOf(QDir::separator(), oldslash+1); |