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

Unified Diff: sdk/lib/_internal/pub/lib/src/command/build.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/command/build.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/build.dart b/sdk/lib/_internal/pub/lib/src/command/build.dart
index ed16ac91de56fc0c5c1ae6bc5cd8b1170c79b247..353921da2747e3942f963bd1c9df15ee4b1abf11 100644
--- a/sdk/lib/_internal/pub/lib/src/command/build.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/build.dart
@@ -133,7 +133,7 @@ class BuildCommand extends BarbackCommand {
return new Future.value();
}
- var destPath = _idtoPath(asset.id);
+ var destPath = _idToPath(asset.id);
// If the asset is from a public directory, copy it into all of the
// top-level build directories.
@@ -159,8 +159,8 @@ class BuildCommand extends BarbackCommand {
/// foo|test/main.dart -> ERROR
///
/// Throws a [FormatException] if [id] is not a valid public asset.
- String _idtoPath(AssetId id) {
- var parts = path.url.split(id.path);
+ String _idToPath(AssetId id) {
Bob Nystrom 2014/06/02 22:49:49 Ugh, how did this happen? Oops.
+ var parts = path.split(path.fromUri(id.path));
if (parts.length < 2) {
throw new FormatException(
@@ -207,7 +207,7 @@ class BuildCommand extends BarbackCommand {
.map((id) => path.dirname(path.fromUri(id.path)))
// Don't copy files to the top levels of the build directories since
// the normal lib asset copying will take care of that.
- .where((dir) => dir.contains(path.separator))
+ .where((dir) => path.split(dir).length > 1)
.toSet();
for (var dir in entrypointDirs) {

Powered by Google App Engine
This is Rietveld 408576698