Commit 3fda2087 authored by Stefan Brüns's avatar Stefan Brüns
Browse files

Remove bogus duplicate check

The second condition can never be fulfilled on the first iteration
(QDirIterator does not return a path twice), but only after the
QDirIterator has been reset in the outer loop.

As validThumbnails is incremented when hadFirstThumbnail gets assigned,
the outer loop will never be run after the initial assignement of
hadFirstThumbnail, so the condition can never be true.
parent 4d74b884
......@@ -538,10 +538,6 @@ QImage ThumbnailProtocol::thumbForDirectory(const QString& directory)
dir.next();
if (validThumbnails > 0 && hadFirstThumbnail == dir.filePath()) {
break; // Never show the same thumbnail twice
}
auto fileSize = dir.fileInfo().size();
if ((fileSize == 0) || (fileSize > m_maxFileSize)) {
// don't create thumbnails for files that exceed
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment