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

Unified Diff: lib/src/normalize_path.dart

Issue 981273002: fix relative @HtmlImport paths in deep folders in deployment mode (Closed) Base URL: git@github.com:dart-lang/web-components.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « lib/build/html_import_annotation_recorder.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/normalize_path.dart
diff --git a/lib/src/normalize_path.dart b/lib/src/normalize_path.dart
index bac6b8b5ba02bf0c082f553cd988f935874bffde..129dfe63e4cd59ada22297630c055dbc63471f9a 100644
--- a/lib/src/normalize_path.dart
+++ b/lib/src/normalize_path.dart
@@ -13,16 +13,13 @@ String normalizeHtmlImportPath(
}
var dartFileDir = path.url.dirname(dartFilePath);
- var segments = path.url.split(dartFileDir);
- // The dartFileDir without the leading dir (web, lib, test, etc).
- var dartFileSubDir = path.url.joinAll(segments.getRange(1, segments.length));
// Relative paths have no package supplied.
if (dartFilePackage == null) {
- return path.url.normalize(path.url.join(dartFileSubDir, filePath));
+ return path.url.normalize(path.url.join(dartFileDir, filePath));
}
// Only option left is a packages/ path.
return path.url.normalize(
- path.url.join('packages/', dartFilePackage, dartFileSubDir, filePath));
+ path.url.join('packages/', dartFilePackage, dartFileDir, filePath));
}
« no previous file with comments | « lib/build/html_import_annotation_recorder.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698