diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2009-08-11 16:11:14 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@trolltech.com> | 2009-08-11 16:15:13 (GMT) |
commit | eb4efda5c8a9a32c38945e26f68217b170b87ffb (patch) | |
tree | cbb4c4c91c1c9edcb5f90137fcfdd59a98ee05c0 /src | |
parent | 204c771ab5c0ef62c76ead594bfeacc3627ab108 (diff) | |
download | Qt-eb4efda5c8a9a32c38945e26f68217b170b87ffb.zip Qt-eb4efda5c8a9a32c38945e26f68217b170b87ffb.tar.gz Qt-eb4efda5c8a9a32c38945e26f68217b170b87ffb.tar.bz2 |
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 <joerg.bornemann@trolltech.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qfsfileengine_win.cpp | 8 |
1 files 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; + } } } } |