summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-05-19 13:44:33 (GMT)
committerEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-05-19 13:47:02 (GMT)
commit1096c69365d14df903ad1dd0e842764146aee01d (patch)
treeb050ca2e22ef086e224094e90b42f34ae8a8ee6c /src
parent07e5f5f3b3b1936c5f5090b02cc2c02e344822b5 (diff)
downloadQt-1096c69365d14df903ad1dd0e842764146aee01d.zip
Qt-1096c69365d14df903ad1dd0e842764146aee01d.tar.gz
Qt-1096c69365d14df903ad1dd0e842764146aee01d.tar.bz2
Fix stopping link loops in QDirIterator on Windows
currentFileInfo is only used for returning from the public functions since the file info used in the algorithm is one step ahead. nextFileInfo is the one actually used in the algorithm. The bug was introduced in a compile fix for Windows and broke the stopLinkLoop test for QDirIterator. Reviewed-by: Olivier
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qdiriterator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index b14f436..81bfb27 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -201,8 +201,8 @@ void QDirIteratorPrivate::advance()
QString subDir = it->currentFilePath();
#ifdef Q_OS_WIN
- if (currentFileInfo.isSymLink())
- subDir = currentFileInfo.canonicalFilePath();
+ if (nextFileInfo.isSymLink())
+ subDir = nextFileInfo.canonicalFilePath();
#endif
pushSubDirectory(subDir, it->nameFilters(), it->filters());
}