diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-12-09 13:35:32 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-12-09 13:35:32 (GMT) |
commit | bdb485519d957bb551d5eeae8a866df45a59c647 (patch) | |
tree | 35f180022ae26dca2945fa6498af3de92e4eb362 /src/corelib/io | |
parent | 5c8afa87bcb975681b42529456335583df314ff5 (diff) | |
download | Qt-bdb485519d957bb551d5eeae8a866df45a59c647.zip Qt-bdb485519d957bb551d5eeae8a866df45a59c647.tar.gz Qt-bdb485519d957bb551d5eeae8a866df45a59c647.tar.bz2 |
Use realpath() only on systems we know it works on.
We use realpath(X,0) extension that is defined by the latest POSIX standard and
not many systems support it at the moment. For now we limit it to Linux and
Symbian. Mac supports it starting with 10.6, and we'll implement it properly
for Mac in 4.7. We know that neither *BSD systems nor Solaris do not support
it.
Reviewed-by: Markus Goetz
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfsfileengine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index 37b0ea1..e4c4e3f 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -144,7 +144,7 @@ QString QFSFileEnginePrivate::canonicalized(const QString &path) return path; #endif // Mac OS X 10.5.x doesn't support the realpath(X,0) extenstion we use here. -#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) || defined(Q_OS_SYMBIAN) +#if defined(Q_OS_LINIX) || defined(Q_OS_SYMBIAN) char *ret = realpath(path.toLocal8Bit().constData(), (char*)0); if (ret) { QString canonicalPath = QDir::cleanPath(QString::fromLocal8Bit(ret)); |