| Index: sdk/lib/_internal/dartdoc/lib/src/mirrors/dart2js_mirror.dart
|
| diff --git a/sdk/lib/_internal/dartdoc/lib/src/mirrors/dart2js_mirror.dart b/sdk/lib/_internal/dartdoc/lib/src/mirrors/dart2js_mirror.dart
|
| index a28bb7ff3aa628f1e8bd7147863e4c3e168f23f7..61e27b85dee175a3e12c682771e55648ae5f4997 100644
|
| --- a/sdk/lib/_internal/dartdoc/lib/src/mirrors/dart2js_mirror.dart
|
| +++ b/sdk/lib/_internal/dartdoc/lib/src/mirrors/dart2js_mirror.dart
|
| @@ -339,10 +339,13 @@ class Dart2JsCompilation implements Compilation {
|
| Dart2JsCompilation(Path script, Path libraryRoot,
|
| [Path packageRoot, List<String> opts = const <String>[]])
|
| : cwd = getCurrentDirectory(), sourceFiles = <String, SourceFile>{} {
|
| - var libraryUri = cwd.resolve(libraryRoot.toString());
|
| + // Ensure that the URI ends with a / an thus is interpreted as a directory.
|
| + var libraryUri = cwd.resolve(
|
| + libraryRoot.hasTrailingSeparator ? '$libraryRoot' : '$libraryRoot/');
|
| var packageUri;
|
| if (packageRoot != null) {
|
| - packageUri = cwd.resolve(packageRoot.toString());
|
| + packageUri = cwd.resolve(
|
| + libraryRoot.hasTrailingSeparator ? '$packageRoot' : '$packageRoot/');
|
| } else {
|
| packageUri = libraryUri;
|
| }
|
| @@ -356,10 +359,13 @@ class Dart2JsCompilation implements Compilation {
|
| Dart2JsCompilation.library(List<Path> libraries, Path libraryRoot,
|
| [Path packageRoot, List<String> opts = const <String>[]])
|
| : cwd = getCurrentDirectory(), sourceFiles = <String, SourceFile>{} {
|
| - var libraryUri = cwd.resolve(libraryRoot.toString());
|
| + // Ensure that the URI ends with a / an thus is interpreted as a directory.
|
| + var libraryUri = cwd.resolve(
|
| + libraryRoot.hasTrailingSeparator ? '$libraryRoot' : '$libraryRoot/');
|
| var packageUri;
|
| if (packageRoot != null) {
|
| - packageUri = cwd.resolve(packageRoot.toString());
|
| + packageUri = cwd.resolve(
|
| + libraryRoot.hasTrailingSeparator ? '$packageRoot' : '$packageRoot/');
|
| } else {
|
| packageUri = libraryUri;
|
| }
|
|
|