Fix project loading absolute path normalization for clang_args

This commit is contained in:
Jacob Dufault 2017-10-28 14:51:36 -07:00
parent 82f8133d7e
commit 98c701b217

View File

@ -125,7 +125,7 @@ Project::Entry GetCompilationEntryFromCompileCommandEntry(
auto cleanup_maybe_relative_path = [&](const std::string& path) {
assert(!path.empty());
if (path[0] == '/')
if (path[0] == '/' || entry.directory.empty())
return NormalizePathWithTestOptOut(path);
return NormalizePathWithTestOptOut(entry.directory + "/" + path);
};