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

Unified Diff: pkg/polymer/lib/src/info.dart

Issue 23445009: Prune the old deploy code. This CL does a few changes: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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: pkg/polymer/lib/src/info.dart
diff --git a/pkg/polymer/lib/src/info.dart b/pkg/polymer/lib/src/info.dart
index 9a7b530dbc9304b80f28cdfc2988f06d7a108152..e226ba6674ec866f5f9ee809f82b6e2b515e2222 100644
--- a/pkg/polymer/lib/src/info.dart
+++ b/pkg/polymer/lib/src/info.dart
@@ -293,31 +293,19 @@ class UrlInfo {
* an error message if the url is an absolute url.
*/
static UrlInfo resolve(String url, UrlInfo inputUrl, Span span,
- String packageRoot, Messages messages, {bool ignoreAbsolute: false}) {
+ Messages messages, {bool ignoreAbsolute: false}) {
var uri = Uri.parse(url);
- if (uri.host != '' || (uri.scheme != '' && uri.scheme != 'package')) {
+ if (uri.host != '' || (uri.scheme != '') || path.isAbsolute(url)) {
if (!ignoreAbsolute) {
messages.error('absolute paths not allowed here: "$url"', span);
}
return null;
}
- var target;
- if (url.startsWith('package:')) {
- target = path.join(packageRoot, url.substring(8));
- } else if (path.isAbsolute(url)) {
- if (!ignoreAbsolute) {
- messages.error('absolute paths not allowed here: "$url"', span);
- }
- return null;
- } else {
- target = path.join(path.dirname(inputUrl.resolvedPath), url);
- url = pathToUrl(path.normalize(path.join(
- path.dirname(inputUrl.url), url)));
- }
- target = path.normalize(target);
-
+ var target = path.normalize(
+ path.join(path.dirname(inputUrl.resolvedPath), url));
+ url = pathToUrl(path.normalize(path.join(path.dirname(inputUrl.url), url)));
return new UrlInfo(url, target, span);
}

Powered by Google App Engine
This is Rietveld 408576698