Index: tools/gn/label.cc |
diff --git a/tools/gn/label.cc b/tools/gn/label.cc |
index 095128d81e2014856e9bee4d4e45ebd509f0c162..ca294c8c9cddf5f37140fd0a5eacac921e512954 100644 |
--- a/tools/gn/label.cc |
+++ b/tools/gn/label.cc |
@@ -6,6 +6,7 @@ |
#include "base/logging.h" |
#include "tools/gn/err.h" |
+#include "tools/gn/filesystem_utils.h" |
#include "tools/gn/parse_tree.h" |
#include "tools/gn/value.h" |
@@ -93,8 +94,14 @@ bool Resolve(const SourceDir& current_dir, |
Err* err) { |
// To workaround the problem that StringPiece operator[] doesn't return a ref. |
const char* input_str = input.data(); |
- |
- size_t path_separator = input.find_first_of(":("); |
+ size_t offset = 0; |
+#if defined(OS_WIN) |
brettw
2015/01/20 21:05:00
On Windows, this accepts either "/C:/foo" or "C:/f
|
+ if (IsPathAbsolute(input)) { |
+ // Skip over the drive letter colon. |
+ offset = 3; |
+ } |
+#endif |
+ size_t path_separator = input.find_first_of(":(", offset); |
base::StringPiece location_piece; |
base::StringPiece name_piece; |
base::StringPiece toolchain_piece; |