mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-21 16:09:40 +00:00
Fix project loading absolute path normalization for clang_args
This commit is contained in:
parent
82f8133d7e
commit
98c701b217
@ -125,7 +125,7 @@ Project::Entry GetCompilationEntryFromCompileCommandEntry(
|
|||||||
|
|
||||||
auto cleanup_maybe_relative_path = [&](const std::string& path) {
|
auto cleanup_maybe_relative_path = [&](const std::string& path) {
|
||||||
assert(!path.empty());
|
assert(!path.empty());
|
||||||
if (path[0] == '/')
|
if (path[0] == '/' || entry.directory.empty())
|
||||||
return NormalizePathWithTestOptOut(path);
|
return NormalizePathWithTestOptOut(path);
|
||||||
return NormalizePathWithTestOptOut(entry.directory + "/" + path);
|
return NormalizePathWithTestOptOut(entry.directory + "/" + path);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user