From 78d93e50dde05054e1d18d2a477123749da8a231 Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Thu, 9 Nov 2017 14:34:36 +0100 Subject: [PATCH] logic: Fixed single header files within indexed paths were not indexed (issue #513) --- src/lib/utility/file/FileRegister.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/lib/utility/file/FileRegister.cpp b/src/lib/utility/file/FileRegister.cpp index 3986265e..7979579a 100644 --- a/src/lib/utility/file/FileRegister.cpp +++ b/src/lib/utility/file/FileRegister.cpp @@ -26,10 +26,21 @@ FileRegister::FileRegister( { for (const FilePath& indexedPath: m_indexedPaths) { - if (indexedPath.contains(filePath)) + if (indexedPath.isDirectory()) { - ret = true; - break; + if (indexedPath.contains(filePath)) + { + ret = true; + break; + } + } + else + { + if (indexedPath == filePath) + { + ret = true; + break; + } } } }