summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2009-08-11 16:11:14 (GMT)
committerJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-11 16:15:13 (GMT)
commiteb4efda5c8a9a32c38945e26f68217b170b87ffb (patch)
treecbb4c4c91c1c9edcb5f90137fcfdd59a98ee05c0
parent204c771ab5c0ef62c76ead594bfeacc3627ab108 (diff)
downloadQt-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>
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp8
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;
+ }
}
}
}