summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2010-10-11 16:11:54 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2010-10-12 12:58:28 (GMT)
commit4f9b25ffa8025702c82a32538b82d15acf03303b (patch)
tree8e5c3063fb4c6b2af0fc19c2bfa08c5e7d8c17fa /src
parent0dd8d6e60a850b42b75d64ccc7eb793ae5c1549b (diff)
downloadQt-4f9b25ffa8025702c82a32538b82d15acf03303b.zip
Qt-4f9b25ffa8025702c82a32538b82d15acf03303b.tar.gz
Qt-4f9b25ffa8025702c82a32538b82d15acf03303b.tar.bz2
Fix return value for QDir::mkdir on symbian
Qt 4.7 behaviour was to return false when directory already exists for mkdir but true when directory already exists for mkpath. This change makes symbian do that in master, even though it's inconsistent. Reviewed-By: Thomas Zander
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfilesystemengine_symbian.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemengine_symbian.cpp b/src/corelib/io/qfilesystemengine_symbian.cpp
index 877ea7a..d068248 100644
--- a/src/corelib/io/qfilesystemengine_symbian.cpp
+++ b/src/corelib/io/qfilesystemengine_symbian.cpp
@@ -115,6 +115,7 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry)
QString orig = entry.filePath();
const bool isAbsolute = entry.isAbsolute();
const bool isDirty = (orig.contains(QLatin1String("/../")) || orig.contains(QLatin1String("/./")) ||
+ orig.contains(QLatin1String("//")) ||
orig.endsWith(QLatin1String("/..")) || orig.endsWith(QLatin1String("/.")));
if (isAbsolute && !isDirty)
return entry;
@@ -258,7 +259,9 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea
r = qt_s60GetRFs().MkDirAll(qt_QString2TPtrC(abspath));
else
r = qt_s60GetRFs().MkDir(qt_QString2TPtrC(abspath));
- return (r == KErrNone || r == KErrAlreadyExists);
+ if (createParents && r == KErrAlreadyExists)
+ return true; //# Qt5 - QDir::mkdir returns false for existing dir, QDir::mkpath returns true (should be made consistent in Qt 5)
+ return (r == KErrNone);
}
//static