const QByteArray chunk = QFile::encodeName(dirName.left(slash));
QT_STATBUF st;
if (QT_STAT(chunk.constData(), &st) == 0) {
- if ((st.st_mode & S_IFMT) != S_IFDIR)
+ if (!S_ISDIR(st.st_mode))
return false;
} else if (QT_MKDIR(chunk.constData(), 0777) != 0) {
return false;
const QByteArray chunk = QFile::encodeName(dirName.left(slash));
QT_STATBUF st;
if (QT_STAT(chunk.constData(), &st) == 0) {
- if ((st.st_mode & S_IFMT) != S_IFDIR)
+ if (!S_ISDIR(st.st_mode))
return false;
if (::rmdir(chunk.constData()) != 0)
return oldslash != 0;
entryFlags |= QFileSystemMetaData::OtherExecutePermission;
// Type
- if ((statBuffer.st_mode & S_IFMT) == S_IFREG)
+ if (S_ISREG(statBuffer.st_mode))
entryFlags |= QFileSystemMetaData::FileType;
- else if ((statBuffer.st_mode & S_IFMT) == S_IFDIR)
+ else if (S_ISDIR(statBuffer.st_mode))
entryFlags |= QFileSystemMetaData::DirectoryType;
else
entryFlags |= QFileSystemMetaData::SequentialType;