Commit 4d74b884 authored by Stefan Brüns's avatar Stefan Brüns
Browse files

Do not try to create a thumbnail for an empty file

Instead of doing a lookup for a thumbnail which is guaranteed to to not
exist, and then trying to find a suitable plugin, which exists neither,
just skip the file.
parent 0ec68f2a
......@@ -542,9 +542,10 @@ QImage ThumbnailProtocol::thumbForDirectory(const QString& directory)
break; // Never show the same thumbnail twice
if (dir.fileInfo().size() > m_maxFileSize) {
auto fileSize = dir.fileInfo().size();
if ((fileSize == 0) || (fileSize > m_maxFileSize)) {
// don't create thumbnails for files that exceed
// the maximum set file size
// the maximum set file size or are empty
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