QFileSystemEngine/Unix: support UF_HIDDEN on the other BSDs
The stat::st_flags and fchflags(2) syscall are marked: HISTORY The chflags() and fchflags functions first appeared in 4.4BSD. Change-Id: I81480fdb578d4d43b3fcfffd14d4fd23bd27e37e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias C. Berner <tcberner@FreeBSD.org>
This commit is contained in:
parent
6504bc6bbc
commit
e94830f496
@ -464,7 +464,7 @@ void QFileSystemMetaData::fillFromStatBuf(const QT_STATBUF &statBuffer)
|
||||
if (statBuffer.st_nlink == 0)
|
||||
entryFlags |= QFileSystemMetaData::WasDeletedAttribute;
|
||||
size_ = statBuffer.st_size;
|
||||
#if defined(Q_OS_DARWIN)
|
||||
#ifdef UF_HIDDEN
|
||||
if (statBuffer.st_flags & UF_HIDDEN) {
|
||||
entryFlags |= QFileSystemMetaData::HiddenAttribute;
|
||||
knownFlagsMask |= QFileSystemMetaData::HiddenAttribute;
|
||||
@ -878,6 +878,8 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
|
||||
if (!data.hasFlags(QFileSystemMetaData::DirectoryType))
|
||||
what |= QFileSystemMetaData::DirectoryType;
|
||||
}
|
||||
#endif
|
||||
#ifdef UF_HIDDEN
|
||||
if (what & QFileSystemMetaData::HiddenAttribute) {
|
||||
// OS X >= 10.5: st_flags & UF_HIDDEN
|
||||
what |= QFileSystemMetaData::PosixStatFlags;
|
||||
|
Loading…
Reference in New Issue
Block a user