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

Unified Diff: lib/src/context.dart

Issue 1491503002: Make sure we normalize relative()'s return value. (Closed) Base URL: git@github.com:dart-lang/path@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/context.dart
diff --git a/lib/src/context.dart b/lib/src/context.dart
index a05ffda602947b31077172bba0e324d30949dee0..5331e3701ecf094244b93350f1ebc0a6939080b6 100644
--- a/lib/src/context.dart
+++ b/lib/src/context.dart
@@ -412,7 +412,7 @@ class Context {
/// thrown.
String relative(String path, {String from}) {
// Avoid expensive computation if the path is already relative.
- if (from == null && this.isRelative(path)) return path;
+ if (from == null && this.isRelative(path)) return this.normalize(path);
// Avoid calling [current] since it is slow and calling join() when
// [from] is absolute does nothing.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698