| Index: pkg/analyzer/lib/src/context/builder.dart
|
| diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
|
| index 05421729840a748034c0dfa91208f933c66ed52c..ea35756ee2f1f635e97ae7156921bda2acd83d18 100644
|
| --- a/pkg/analyzer/lib/src/context/builder.dart
|
| +++ b/pkg/analyzer/lib/src/context/builder.dart
|
| @@ -722,8 +722,7 @@ class _BasicWorkspace extends Workspace {
|
| final ResourceProvider provider;
|
|
|
| /**
|
| - * The absolute workspace root path (the directory containing the `.jiri_root`
|
| - * directory).
|
| + * The absolute workspace root path.
|
| */
|
| final String root;
|
|
|
| @@ -769,7 +768,15 @@ class _BasicWorkspace extends Workspace {
|
| * Find the basic workspace that contains the given [path].
|
| */
|
| static _BasicWorkspace find(
|
| - ResourceProvider resourceProvider, String path, ContextBuilder builder) {
|
| - return new _BasicWorkspace._(resourceProvider, path, builder);
|
| + ResourceProvider provider, String path, ContextBuilder builder) {
|
| + Context context = provider.pathContext;
|
| +
|
| + // Ensure that the path is absolute and normalized.
|
| + if (!context.isAbsolute(path)) {
|
| + throw new ArgumentError('not absolute: $path');
|
| + }
|
| + path = context.normalize(path);
|
| +
|
| + return new _BasicWorkspace._(provider, path, builder);
|
| }
|
| }
|
|
|