Skip to content

Commit

Permalink
fix(cxx_indexer): ensure the working directory is absolute (#5708)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahms committed Jun 16, 2023
1 parent 7880a91 commit d73735b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kythe/cxx/indexer/cxx/KytheVFS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ IndexVFS::IndexVFS(absl::string_view working_directory,
style)) {
if (!llvm::sys::path::is_absolute(working_directory_,
llvm::sys::path::Style::posix)) {
absl::FPrintF(stderr, "warning: working directory %s is not absolute\n",
working_directory_);
LOG(WARNING) << "working directory " << working_directory_
<< " is not absolute";
working_directory_ = absl::StrCat("/", working_directory_);
}
for (const auto& data : virtual_files) {
std::string path = FixupPath(data.info().path(), style);
Expand Down

0 comments on commit d73735b

Please sign in to comment.