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 375535328df656d2b4339d34a4cd7afacd48af35..377e9b1e434f11fd2e01610beba1a9686bbb781e 100644 |
--- a/pkg/analyzer/lib/src/context/builder.dart |
+++ b/pkg/analyzer/lib/src/context/builder.dart |
@@ -147,6 +147,9 @@ class ContextBuilder { |
Map<String, List<Folder>> folderMap = new HashMap<String, List<Folder>>(); |
packages.asMap().forEach((String packagePath, Uri uri) { |
String path = resourceProvider.pathContext.fromUri(uri); |
+ if (path.endsWith(resourceProvider.pathContext.separator)) { |
+ path = path.substring(0, path.length - 1); |
+ } |
folderMap[packagePath] = [resourceProvider.getFolder(path)]; |
}); |
return folderMap; |
@@ -284,7 +287,7 @@ class ContextBuilder { |
return embedderSdk; |
}); |
return dartSdk; |
- } else if (extFilePaths != null) { |
+ } else if (extFilePaths != null && extFilePaths.isNotEmpty) { |
// |
// We have an extension file, but no embedder file. |
// |