project: fix initial directory list for recursive .ccls

Fix #717
This commit is contained in:
Fangrui Song 2020-11-06 18:55:01 -08:00
parent a3c5d4a1eb
commit 68d6e4122d

View File

@ -252,7 +252,7 @@ void loadDirectoryListing(ProjectProcessor &proc, const std::string &root,
auto getDotCcls = [&root, &folder](std::string cur) { auto getDotCcls = [&root, &folder](std::string cur) {
while (!(cur = sys::path::parent_path(cur)).empty()) { while (!(cur = sys::path::parent_path(cur)).empty()) {
auto it = folder.dot_ccls.find(cur); auto it = folder.dot_ccls.find(cur + '/');
if (it != folder.dot_ccls.end()) if (it != folder.dot_ccls.end())
return it->second; return it->second;
std::string normalized = normalizePath(cur); std::string normalized = normalizePath(cur);