diff --git a/src/lib/data/PersistentStorage.cpp b/src/lib/data/PersistentStorage.cpp index efd7e332..0d3a0a70 100644 --- a/src/lib/data/PersistentStorage.cpp +++ b/src/lib/data/PersistentStorage.cpp @@ -962,13 +962,12 @@ std::vector PersistentStorage::getLocalSymbolIdsForLocationIds(const std::ve std::vector PersistentStorage::getTokenIdsForMatches(const std::vector& matches) const { - FilePath rootPath = getDbFilePath().parentDirectory(); std::set idSet; for (const SearchMatch& match : matches) { if (match.nodeType == Node::NODE_FILE) { - idSet.insert(m_sqliteStorage.getFileByPath(rootPath.concat(match.subtext).str()).id); + idSet.insert(m_sqliteStorage.getFileByPath(match.name).id); } else {