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

Unified Diff: tools/gn/label_pattern.cc

Issue 1155713006: GN: Make file/dir resolving return errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/label_pattern.cc
diff --git a/tools/gn/label_pattern.cc b/tools/gn/label_pattern.cc
index 712826fe562e0c042df803bbe90d5237dba6d0fc..e5ea5cf4e326dfa7139275e560a38850e2414fcb 100644
--- a/tools/gn/label_pattern.cc
+++ b/tools/gn/label_pattern.cc
@@ -183,13 +183,9 @@ LabelPattern LabelPattern::GetPattern(const SourceDir& current_dir,
}
// Resolve the non-wildcard stuff.
- dir = current_dir.ResolveRelativeDir(path);
- if (dir.is_null()) {
- *err = Err(value, "Label pattern didn't resolve to a dir.",
- "The directory name \"" + path.as_string() + "\" didn't\n"
- "resolve to a directory.");
+ dir = current_dir.ResolveRelativeDir(value, path, err);
+ if (err->has_error())
return LabelPattern();
- }
}
// Resolve the name. At this point, we're doing wildcard matches so the

Powered by Google App Engine
This is Rietveld 408576698