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

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart

Issue 312523007: Fix URL/native path conversions in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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: sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart b/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart
index 3c942a20b28369d78fa2433149da350698b6be48..6f21c8de5360dab40b6749273d90590a73227703 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart
@@ -292,7 +292,8 @@ class _BarbackCompilerProvider implements dart.CompilerProvider {
if (name == "") {
outPath = _transform.primaryInput.id.path;
} else {
- outPath = path.join(path.dirname(_transform.primaryInput.id.path), name);
+ var dirname = path.url.dirname(_transform.primaryInput.id.path);
+ outPath = path.url.join(dirname, name);
}
var id = new AssetId(primaryId.package, "$outPath.$extension");
@@ -393,8 +394,8 @@ class _BarbackCompilerProvider implements dart.CompilerProvider {
// should be loaded directly from disk.
var sourcePath = path.fromUri(url);
if (_environment.containsPath(sourcePath)) {
- var relative = path.relative(sourcePath,
- from: _environment.rootPackage.dir);
+ var relative = path.toUri(path.relative(sourcePath,
+ from: _environment.rootPackage.dir)).toString();
return new AssetId(_environment.rootPackage.name, relative);
}

Powered by Google App Engine
This is Rietveld 408576698