mirror of
https://github.com/MaskRay/ccls.git
synced 2025-06-06 16:24:54 +00:00
fix search compile_commands.json when path have soft link , such as /home/Abbyyan/workspace/test1/main.cpp->/data/Abbyyan/workspace/test2/main.cpp
This commit is contained in:
parent
ace782f2fa
commit
719da02020
@ -462,6 +462,12 @@ void Project::loadDirectory(const std::string &root, Project::Folder &folder) {
|
||||
|
||||
if (seen.insert(entry.filename).second)
|
||||
folder.entries.push_back(entry);
|
||||
|
||||
if (cmd.Filename != entry.filename && seen.insert(cmd.Filename).second) {
|
||||
Project::Entry entry_origin = entry;
|
||||
entry_origin.filename = cmd.Filename;
|
||||
folder.entries.push_back(entry_origin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user