| Index: pkg/analyzer/lib/src/generated/source_io.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
|
| index 60740c1050488ebc07cb1b503e83e3e9df49ef8c..ff584e487190fec29eb1db676b7332dfaf272543 100644
|
| --- a/pkg/analyzer/lib/src/generated/source_io.dart
|
| +++ b/pkg/analyzer/lib/src/generated/source_io.dart
|
| @@ -399,20 +399,18 @@ class PackageUriResolver extends UriResolver {
|
|
|
| @override
|
| Uri restoreAbsolute(Source source) {
|
| - if (source is FileBasedSource) {
|
| - String sourcePath = source.file.getPath();
|
| - for (JavaFile packagesDirectory in _packagesDirectories) {
|
| - List<JavaFile> pkgFolders = packagesDirectory.listFiles();
|
| - if (pkgFolders != null) {
|
| - for (JavaFile pkgFolder in pkgFolders) {
|
| - try {
|
| - String pkgCanonicalPath = pkgFolder.getCanonicalPath();
|
| - if (sourcePath.startsWith(pkgCanonicalPath)) {
|
| - String relPath = sourcePath.substring(pkgCanonicalPath.length);
|
| - return parseUriWithException("$PACKAGE_SCHEME:${pkgFolder.getName()}$relPath");
|
| - }
|
| - } catch (e) {
|
| + String sourcePath = source.fullName;
|
| + for (JavaFile packagesDirectory in _packagesDirectories) {
|
| + List<JavaFile> pkgFolders = packagesDirectory.listFiles();
|
| + if (pkgFolders != null) {
|
| + for (JavaFile pkgFolder in pkgFolders) {
|
| + try {
|
| + String pkgCanonicalPath = pkgFolder.getCanonicalPath();
|
| + if (sourcePath.startsWith(pkgCanonicalPath)) {
|
| + String relPath = sourcePath.substring(pkgCanonicalPath.length);
|
| + return parseUriWithException("$PACKAGE_SCHEME:${pkgFolder.getName()}$relPath");
|
| }
|
| + } catch (e) {
|
| }
|
| }
|
| }
|
|
|