From 69d439ae8d872bea163940c5523037716e4328df Mon Sep 17 00:00:00 2001 From: Snibod Date: Sun, 21 Jan 2018 12:48:31 +0100 Subject: [PATCH] Detect Windows absolute paths in LoadCompilationEntriesFromDirectory --- src/project.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/project.cc b/src/project.cc index cdbf7718..b21b1631 100644 --- a/src/project.cc +++ b/src/project.cc @@ -364,7 +364,8 @@ std::vector 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;