Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1622)

Unified Diff: tools/gn/source_dir.cc

Issue 26561005: GYP generator for GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));
}
« tools/gn/setup.h ('K') | « tools/gn/setup.cc ('k') | tools/gn/source_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698