| Index: runtime/bin/builtin.dart
|
| diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
|
| index 4aea641be59f180dc3d26382e7b95bd9bc49d4a7..f84a50fd9d38cbdc17d91a0a58bd71961a6f56c8 100644
|
| --- a/runtime/bin/builtin.dart
|
| +++ b/runtime/bin/builtin.dart
|
| @@ -71,12 +71,20 @@ String _resolveUri(String base, String userString) {
|
| var baseUri = new Uri.fromString(base);
|
| _logResolution("# Resolving: $userString from $base");
|
|
|
| - // Relative URIs with scheme dart-ext should be resolved as if with no scheme.
|
| var uri = new Uri.fromString(userString);
|
| var resolved;
|
| if ('dart-ext' == uri.scheme) {
|
| + // Relative URIs with scheme dart-ext should be resolved as if with no
|
| + // scheme.
|
| resolved = baseUri.resolve(uri.path);
|
| - resolved = new Uri.fromComponents(scheme: "dart-ext", path: resolved.path);
|
| + var path = resolved.path;
|
| + if (resolved.scheme == 'package') {
|
| + // If we are resolving relative to a package URI we go directly to the
|
| + // file path and keep the dart-ext scheme. Otherwise, we will lose the
|
| + // package URI path part.
|
| + path = _filePathFromPackageUri(resolved);
|
| + }
|
| + resolved = new Uri.fromComponents(scheme: "dart-ext", path: path);
|
| } else {
|
| resolved = baseUri.resolve(userString);
|
| }
|
|
|