[clangd] Always remove dots before converting paths to URIs in symbol collector.

llvm-svn: 335458
This commit is contained in:
Eric Liu 2018-06-25 11:50:11 +00:00
parent 79e474bf46
commit a095770a82
1 changed files with 2 additions and 1 deletions

View File

@ -75,9 +75,10 @@ llvm::Optional<std::string> toURI(const SourceManager &SM, StringRef Path,
}
} else if (!Opts.FallbackDir.empty()) {
llvm::sys::fs::make_absolute(Opts.FallbackDir, AbsolutePath);
llvm::sys::path::remove_dots(AbsolutePath, /*remove_dot_dot=*/true);
}
llvm::sys::path::remove_dots(AbsolutePath, /*remove_dot_dot=*/true);
std::string ErrMsg;
for (const auto &Scheme : Opts.URISchemes) {
auto U = URI::create(AbsolutePath, Scheme);