mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 01:21:57 +00:00
normalize path in -I flag
This commit is contained in:
parent
ce736c84e0
commit
2f61e1b4f4
@ -42,7 +42,6 @@ std::vector<CompilationEntry> LoadFromDirectoryListing(const std::string& projec
|
||||
static const char *kValueArgs[] = {
|
||||
"--param",
|
||||
"-G",
|
||||
"-I",
|
||||
"-MF",
|
||||
"-MQ",
|
||||
"-MT",
|
||||
@ -165,6 +164,11 @@ std::vector<CompilationEntry> LoadCompilationEntriesFromDirectory(const std::str
|
||||
}
|
||||
|
||||
|
||||
if (StartsWith(arg, "-I")) {
|
||||
std::string path = directory + "/" + arg.substr(2);
|
||||
path = NormalizePath(path);
|
||||
arg = "-I" + path;
|
||||
}
|
||||
|
||||
entry.args.push_back(arg);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user