Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Commit

Permalink
Detect Windows absolute paths in LoadCompilationEntriesFromDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
snibod authored and jacobdufault committed Jan 21, 2018
1 parent 886e862 commit bbee82b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/project.cc
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ std::vector<Project::Entry> LoadCompilationEntriesFromDirectory(
our_time.Resume();
entry.directory = directory;
std::string absolute_filename;
if (!relative_filename.empty() && relative_filename[0] == '/')
if (IsUnixAbsolutePath(relative_filename) ||
IsWindowsAbsolutePath(relative_filename))
absolute_filename = relative_filename;
else
absolute_filename = directory + "/" + relative_filename;
Expand Down

0 comments on commit bbee82b

Please sign in to comment.