| Index: pkg/analysis_server/lib/src/context_manager.dart
|
| diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
|
| index 2d16ea9d852964dafd5ac436d41faa1ae8d37e20..e010a3e505be57eb287ae80e43f1d874116fe46d 100644
|
| --- a/pkg/analysis_server/lib/src/context_manager.dart
|
| +++ b/pkg/analysis_server/lib/src/context_manager.dart
|
| @@ -395,7 +395,15 @@ abstract class ContextManager {
|
| for (JavaFile file in packagesDir.listFiles()) {
|
| // Ensure symlinks in packages directory are canonicalized
|
| // to prevent 'type X cannot be assigned to type X' warnings
|
| - Resource res = resourceProvider.getResource(file.getCanonicalPath());
|
| + String path;
|
| + try {
|
| + path = file.getCanonicalPath();
|
| + } catch (e, s) {
|
| + // Ignore packages that do not exist
|
| + _instrumentationService.logException(e, s);
|
| + continue;
|
| + }
|
| + Resource res = resourceProvider.getResource(path);
|
| if (res is Folder) {
|
| packageMap[file.getName()] = <Folder>[res];
|
| }
|
|
|