diff options
-rw-r--r-- | src/corelib/io/qdiriterator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp index 6d6542f..f36320e 100644 --- a/src/corelib/io/qdiriterator.cpp +++ b/src/corelib/io/qdiriterator.cpp @@ -244,6 +244,10 @@ bool QDirIteratorPrivate::shouldFollowDirectory(const QFileInfo &fileInfo) if (QLatin1String(".") == fileName || QLatin1String("..") == fileName) return false; + // No hidden directories unless requested + if (!(filters & QDir::AllDirs) && !(filters & QDir::Hidden) && fileInfo.isHidden()) + return false; + // Stop link loops if (visitedLinks.contains(fileInfo.canonicalFilePath())) return false; |