src/corelib/io/qfsfileengine.cpp
changeset 18 2f34d5167611
parent 3 41300fa6a67c
child 8 3f74d0d4af4c
equal deleted inserted replaced
3:41300fa6a67c 18:2f34d5167611
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtCore module of the Qt Toolkit.
     7 ** This file is part of the QtCore module of the Qt Toolkit.
     8 **
     8 **
   142 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
   142 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
   143     if (path.size() == 1 && path.at(0) == QLatin1Char('/'))
   143     if (path.size() == 1 && path.at(0) == QLatin1Char('/'))
   144         return path;
   144         return path;
   145 #endif
   145 #endif
   146     // Mac OS X 10.5.x doesn't support the realpath(X,0) extenstion we use here.
   146     // Mac OS X 10.5.x doesn't support the realpath(X,0) extenstion we use here.
   147 #if defined(Q_OS_LINIX) || defined(Q_OS_SYMBIAN)
   147 #if defined(Q_OS_LINUX) || defined(Q_OS_SYMBIAN)
   148     char *ret = realpath(path.toLocal8Bit().constData(), (char*)0);
   148     char *ret = realpath(path.toLocal8Bit().constData(), (char*)0);
   149     if (ret) {
   149     if (ret) {
   150         QString canonicalPath = QDir::cleanPath(QString::fromLocal8Bit(ret));
   150         QString canonicalPath = QDir::cleanPath(QString::fromLocal8Bit(ret));
   151         free(ret);
   151         free(ret);
   152         return canonicalPath;
   152         return canonicalPath;