diff --git a/src/file/fileindexerconfig.cpp b/src/file/fileindexerconfig.cpp --- a/src/file/fileindexerconfig.cpp +++ b/src/file/fileindexerconfig.cpp @@ -168,7 +168,9 @@ bool FileIndexerConfig::shouldBeIndexed(const QString& path) const { QFileInfo fi(path); - if (fi.isDir()) { + if (!fi.isExecutable()) { + return false; + } else if (fi.isDir()) { return shouldFolderBeIndexed(path); } else { return (shouldFolderBeIndexed(fi.absolutePath()) && diff --git a/src/file/filtereddiriterator.cpp b/src/file/filtereddiriterator.cpp --- a/src/file/filtereddiriterator.cpp +++ b/src/file/filtereddiriterator.cpp @@ -125,6 +125,10 @@ if (!m_config->indexHiddenFilesAndFolders() && fi.isHidden()) return false; + if (!fi.isExecutable()) { + return false; + } + return m_config->shouldFileBeIndexed(fi.fileName()); } diff --git a/src/file/modifiedfileindexer.cpp b/src/file/modifiedfileindexer.cpp --- a/src/file/modifiedfileindexer.cpp +++ b/src/file/modifiedfileindexer.cpp @@ -52,7 +52,7 @@ Q_ASSERT(!filePath.endsWith('/')); QString fileName = filePath.mid(filePath.lastIndexOf('/') + 1); - if (!m_config->shouldFileBeIndexed(fileName)) { + if (!m_config->shouldBeIndexed(fileName)) { continue; } diff --git a/src/file/newfileindexer.cpp b/src/file/newfileindexer.cpp --- a/src/file/newfileindexer.cpp +++ b/src/file/newfileindexer.cpp @@ -48,7 +48,7 @@ Q_ASSERT(!filePath.endsWith('/')); QString fileName = filePath.mid(filePath.lastIndexOf('/') + 1); - if (!m_config->shouldFileBeIndexed(fileName)) { + if (!m_config->shouldBeIndexed(fileName)) { continue; } diff --git a/src/file/unindexedfileiterator.cpp b/src/file/unindexedfileiterator.cpp --- a/src/file/unindexedfileiterator.cpp +++ b/src/file/unindexedfileiterator.cpp @@ -94,6 +94,9 @@ if (!fileInfo.exists()) return false; + if (!fileInfo.isExecutable()) + return false; + quint64 fileId = filePathToId(QFile::encodeName(filePath)); Q_ASSERT_X(fileId, "UnIndexedFileIterator::shouldIndex", "file id is 0"); if (!fileId) { diff --git a/src/file/xattrindexer.cpp b/src/file/xattrindexer.cpp --- a/src/file/xattrindexer.cpp +++ b/src/file/xattrindexer.cpp @@ -48,7 +48,7 @@ Q_ASSERT(!filePath.endsWith('/')); QString fileName = filePath.mid(filePath.lastIndexOf('/') + 1); - if (!m_config->shouldFileBeIndexed(fileName)) { + if (!m_config->shouldBeIndexed(fileName)) { continue; }