From eb4efda5c8a9a32c38945e26f68217b170b87ffb Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Tue, 11 Aug 2009 18:11:14 +0200 Subject: QFSFileEngine::mkdir fix on Windows This function now returns early if a non-directory is met in the path. Something like /foo/bar/&&/ will bail out early. Merge-request: 1176 Reviewed-by: Joerg Bornemann --- src/corelib/io/qfsfileengine_win.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 7c75525..11d1ca6 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -958,9 +958,13 @@ bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) con if (slash) { QString chunk = dirName.left(slash); bool existed = false; - if (!isDirPath(chunk, &existed) && !existed) { - if (!mkDir(chunk)) + if (!isDirPath(chunk, &existed)) { + if (!existed) { + if (!mkDir(chunk)) + return false; + } else { return false; + } } } } -- cgit v0.12