summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2009-08-11 16:11:18 (GMT)
committerJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-11 16:17:24 (GMT)
commitc9fb4ac3483c492f32e4f42987935478d4e89eb8 (patch)
tree2bf5c6cc67a5c411c72fe6911df43609ddf7d4d6 /src
parentd703c131bae6fb89672a55e1bcd735e2514e75ac (diff)
downloadQt-c9fb4ac3483c492f32e4f42987935478d4e89eb8.zip
Qt-c9fb4ac3483c492f32e4f42987935478d4e89eb8.tar.gz
Qt-c9fb4ac3483c492f32e4f42987935478d4e89eb8.tar.bz2
micro-optimization in QFSFileEngine::mkdir
Merge-request: 1176 Reviewed-by: Joerg Bornemann <joerg.bornemann@trolltech.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index c0b6820..075aa7c 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -414,15 +414,15 @@ bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) con
if ((st.st_mode & S_IFMT) != S_IFDIR)
return false;
} else if (QT_MKDIR(chunk, 0777) != 0) {
- return false;
+ return false;
}
}
}
return true;
}
#if defined(Q_OS_DARWIN) // Mac X doesn't support trailing /'s
- if (dirName[dirName.length() - 1] == QLatin1Char('/'))
- dirName = dirName.left(dirName.length() - 1);
+ if (dirName.endsWith(QLatin1Char('/')))
+ dirName.chop(1);
#endif
return (QT_MKDIR(QFile::encodeName(dirName), 0777) == 0);
}