logic: fixed names of file nodes that are target of macro use edge

* fixed name of macro use edge target
* fixed generating a file nodes full path in SqliteStorage
This commit is contained in:
malte_langkabel
2017-01-27 15:43:35 +01:00
parent f88fd92962
commit a78cb1d020
3 changed files with 8 additions and 15 deletions
+2 -1
View File
@@ -962,12 +962,13 @@ std::vector<Id> PersistentStorage::getLocalSymbolIdsForLocationIds(const std::ve
std::vector<Id> PersistentStorage::getTokenIdsForMatches(const std::vector<SearchMatch>& matches) const
{
FilePath rootPath = getDbFilePath().parentDirectory();
std::set<Id> idSet;
for (const SearchMatch& match : matches)
{
if (match.nodeType == Node::NODE_FILE)
{
idSet.insert(m_sqliteStorage.getFileByPath(match.name).id);
idSet.insert(m_sqliteStorage.getFileByPath(rootPath.concat(match.subtext).str()).id);
}
else
{
+1 -1
View File
@@ -12,7 +12,7 @@
const size_t SqliteStorage::STORAGE_VERSION = 8;
SqliteStorage::SqliteStorage(const FilePath& dbFilePath)
: m_dbFilePath(dbFilePath)
: m_dbFilePath(dbFilePath.canonical())
{
m_database.open(m_dbFilePath.str().c_str());