Index: tools/gn/source_dir.cc |
diff --git a/tools/gn/source_dir.cc b/tools/gn/source_dir.cc |
index 52ebfd56d2570be86150b5f527cb20781853d52e..025f428d6d19b3d4559f2b152f9e14b781ad900e 100644 |
--- a/tools/gn/source_dir.cc |
+++ b/tools/gn/source_dir.cc |
@@ -116,7 +116,12 @@ base::FilePath SourceDir::Resolve(const base::FilePath& source_root) const { |
std::string converted; |
if (is_system_absolute()) { |
- converted = value_; |
+ if (value_.size() > 2 && value_[2] == ':') { |
+ // Windows path, strip the leading slash. |
+ converted.assign(&value_[1], value_.size() - 1); |
Evan Martin
2013/10/15 19:19:10
converted = value_.substr(1);
brettw
2013/10/15 20:18:01
Doesn't that make an extra temporary in < C++11?
|
+ } else { |
+ converted.assign(value_); |
+ } |
ConvertPathToSystem(&converted); |
return base::FilePath(UTF8ToFilePath(converted)); |
} |