Chromium Code Reviews| Index: tools/gn/label_pattern.cc |
| diff --git a/tools/gn/label_pattern.cc b/tools/gn/label_pattern.cc |
| index 396a9b73a9d4fc1f269d926496b2dda5d0a46e89..331a3858869b354b18d085bc9baa7c40987bd07c 100644 |
| --- a/tools/gn/label_pattern.cc |
| +++ b/tools/gn/label_pattern.cc |
| @@ -121,7 +121,14 @@ LabelPattern LabelPattern::GetPattern(const SourceDir& current_dir, |
| // Extract path and name. |
| base::StringPiece path; |
| base::StringPiece name; |
| - size_t colon = str.find(':'); |
| + size_t offset = 0; |
| +#if defined(OS_WIN) |
| + if (IsPathAbsolute(str)) { |
|
brettw
2015/01/20 21:05:00
Ditto
|
| + // Skip over the drive letter colon. |
| + offset = 3; |
| + } |
| +#endif |
| + size_t colon = str.find(':', offset); |
| if (colon == std::string::npos) { |
| path = base::StringPiece(str); |
| } else { |