mirror of
https://github.com/MaskRay/ccls.git
synced 2025-06-07 08:44:55 +00:00
Allow relative path for directory
directory in compiler_commands.json If the value is relative we resolve it from root
This commit is contained in:
parent
1dc69f45dc
commit
f5d6fcde8e
@ -432,7 +432,8 @@ void Project::loadDirectory(const std::string &root, Project::Folder &folder) {
|
|||||||
|
|
||||||
// If workspace folder is real/ but entries use symlink/, convert to
|
// If workspace folder is real/ but entries use symlink/, convert to
|
||||||
// real/.
|
// real/.
|
||||||
entry.directory = realPath(cmd.Directory);
|
entry.directory =
|
||||||
|
realPath(resolveIfRelative(cdbDir.c_str(), cmd.Directory));
|
||||||
entry.directory.push_back('/');
|
entry.directory.push_back('/');
|
||||||
normalizeFolder(entry.directory);
|
normalizeFolder(entry.directory);
|
||||||
entry.directory.pop_back();
|
entry.directory.pop_back();
|
||||||
|
Loading…
Reference in New Issue
Block a user