Skip to content

Commit

Permalink
Use real_path.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuey committed Mar 29, 2024
1 parent 9fdc118 commit d526748
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/SourcesCommand.cc
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,10 @@ DebugDirs DebugDirManager::read_result() {

char* token = strtok(buf, delimiter);
while (token != nullptr) {
char* buf = realpath(token, nullptr);
if (buf) {
auto s = string(buf);
result.debug_file_directories.push_back(s);
LOG(debug) << "gdb script added debug dir '" << s << "'";
free(buf);
} else {
LOG(debug) << "realpath(" << token << ") = " << strerror(errno);
}
string s(token);
s = real_path(s);
result.debug_file_directories.push_back(s);
LOG(debug) << "gdb script added debug dir '" << s << "'";
token = strtok(nullptr, delimiter);
}

Expand Down

0 comments on commit d526748

Please sign in to comment.