diff --git a/src/file/firstrunindexer.cpp b/src/file/firstrunindexer.cpp --- a/src/file/firstrunindexer.cpp +++ b/src/file/firstrunindexer.cpp @@ -56,9 +56,14 @@ FilteredDirIterator it(m_config, folder); while (!it.next().isEmpty()) { - QString mimetype = mimeDb.mimeTypeForFile(it.filePath(), QMimeDatabase::MatchExtension).name(); - if (!m_config->shouldMimeTypeBeIndexed(mimetype)) { - continue; + QString mimetype; + if (it.fileInfo().isDir()) { + mimetype = QStringLiteral("inode/directory"); + } else { + mimetype = mimeDb.mimeTypeForFile(it.filePath(), QMimeDatabase::MatchExtension).name(); + if (!m_config->shouldMimeTypeBeIndexed(mimetype)) { + continue; + } } BasicIndexingJob job(it.filePath(), mimetype, level);