QDirIterator: make a confusing condition less so
The old code checked for non-empty-ness before asking whether it contains a certain path. But an empty container cannot contain any path. Simply remove the isEmpty() check. Change-Id: Ie40279a8db4900c2f7892c2a058206d622565b10 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
74306a02ce
commit
e62f6ffcb3
@ -319,8 +319,7 @@ void QDirIteratorPrivate::checkAndPushDirectory(const QFileInfo &fileInfo)
|
||||
return;
|
||||
|
||||
// Stop link loops
|
||||
if (!visitedLinks.isEmpty() &&
|
||||
visitedLinks.contains(fileInfo.canonicalFilePath()))
|
||||
if (visitedLinks.contains(fileInfo.canonicalFilePath()))
|
||||
return;
|
||||
|
||||
pushDirectory(fileInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user