Changeset 532


Ignore:
Timestamp:
Feb 5, 2010, 1:54:11 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

corelib: Fixed: QFileInfo::isExecutable() would return true for all files on local OS/2 file systems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/io/qfileinfo.cpp

    r363 r532  
    171171        break;
    172172    };
    173 #if defined(Q_OS_UNIX) || defined(Q_OS_OS2)
     173#ifdef Q_OS_UNIX
     174    return QT_ACCESS(QFile::encodeName(data->fileName).data(), mode) == 0;
     175#endif
     176#ifdef Q_OS_OS2
     177    if ((access == ReadAccess && !getFileFlags(QAbstractFileEngine::ReadUserPerm))
     178        || (access == WriteAccess && !getFileFlags(QAbstractFileEngine::WriteUserPerm))) {
     179        return false;
     180    }
     181    if (access == ExecuteAccess)
     182        return getFileFlags(QAbstractFileEngine::ExeUserPerm);
     183
    174184    return QT_ACCESS(QFile::encodeName(data->fileName).data(), mode) == 0;
    175185#endif
Note: See TracChangeset for help on using the changeset viewer.