diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qdiriterator.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp index 44ba950..d372ed3 100644 --- a/src/corelib/io/qdiriterator.cpp +++ b/src/corelib/io/qdiriterator.cpp @@ -160,16 +160,9 @@ QDirIteratorPrivate::~QDirIteratorPrivate() void QDirIteratorPrivate::pushSubDirectory(const QString &path, const QStringList &nameFilters, QDir::Filters filters) { - if (iteratorFlags & QDirIterator::FollowSymlinks) { - if (nextFileInfo.filePath() != path) - nextFileInfo.setFile(path); - if (nextFileInfo.isSymLink()) { - visitedLinks << nextFileInfo.canonicalFilePath(); - } else { - visitedLinks << nextFileInfo.absoluteFilePath(); - } - } - + if (iteratorFlags & QDirIterator::FollowSymlinks) + visitedLinks << nextFileInfo.canonicalFilePath(); + if (engine || (engine = QAbstractFileEngine::create(this->path))) { engine->setFileName(path); QAbstractFileEngineIterator *it = engine->beginEntryList(filters, nameFilters); |