diff options
Diffstat (limited to 'src/corelib/io/qfsfileengine.cpp')
-rw-r--r-- | src/corelib/io/qfsfileengine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index efc09a0..b8f6e2c 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -139,7 +139,11 @@ QString QFSFileEnginePrivate::canonicalized(const QString &path) return path; #if defined(Q_OS_UNIX) || defined(Q_OS_SYMBIAN) - // FIXME let's see if this stuff works, then we might be able to remove some of the other code + // FIXME let's see if this stuff works, then we might be able to remove some of the other code. + // baaad Mac: 10.5 and 10.6 crash if trying to free a value returned by + // realpath() if the input path is just the root component. + if (path.size() == 1 && path.at(0) == QLatin1Char('/')) + return path; char *ret = realpath(path.toLocal8Bit().constData(), (char*)0); if (ret) { QString canonicalPath = QDir::cleanPath(QString::fromLocal8Bit(ret)); |