data: Fixed file id retrieval for file in search match

This commit is contained in:
Eberhard Graether
2017-02-20 11:24:01 +01:00
parent 5dc901ea13
commit 04a5abdf98
+7 -1
View File
@@ -1078,7 +1078,13 @@ std::vector<Id> PersistentStorage::getTokenIdsForMatches(const std::vector<Searc
{
if (match.nodeType == Node::NODE_FILE)
{
idSet.insert(m_sqliteStorage.getFileByPath(rootPath.concat(match.subtext).canonical().str()).id);
FilePath path(match.subtext);
if (!path.isAbsolute())
{
path = rootPath.concat(path).canonical();
}
idSet.insert(m_sqliteStorage.getFileByPath(path.str()).id);
}
else
{