Chromium Code Reviews| 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) { |