Detect Windows absolute paths in LoadCompilationEntriesFromDirectory

This commit is contained in:
Snibod 2018-01-21 12:48:31 +01:00 committed by Jacob Dufault
parent e4d4c7b139
commit 69d439ae8d

View File

@ -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;