Index: pkg/analyzer/lib/src/dart/analysis/file_state.dart |
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart |
index cc988988102752ae3f18f1d13dd7b3fec5170e75..eeb734a69a7cc3b2254d3a03ad2c2fa4fd4b77c8 100644 |
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart |
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart |
@@ -592,7 +592,7 @@ class FileSystemState { |
// Try to get the existing instance. |
file = _uriToFile[uri]; |
// If we have a file, call it the canonical one and return it. |
- if (file != null) { |
+ if (file != null && file.path == path) { |
_pathToCanonicalFile[path] = file; |
return file; |
} |