| Index: compiler/java/com/google/dart/compiler/PackageLibraryManager.java
|
| ===================================================================
|
| --- compiler/java/com/google/dart/compiler/PackageLibraryManager.java (revision 12565)
|
| +++ compiler/java/com/google/dart/compiler/PackageLibraryManager.java (working copy)
|
| @@ -5,6 +5,7 @@
|
| package com.google.dart.compiler;
|
|
|
| import java.io.File;
|
| +import java.io.IOException;
|
| import java.net.URI;
|
| import java.net.URISyntaxException;
|
| import java.util.ArrayList;
|
| @@ -46,8 +47,8 @@
|
|
|
| public static final String DART_SCHEME = "dart";
|
| public static final String DART_SCHEME_SPEC = "dart:";
|
| +
|
|
|
| -
|
| /**
|
| * Answer <code>true</code> if the string is a dart spec
|
| */
|
| @@ -171,8 +172,13 @@
|
| }
|
| for (URI rootUri : packageRootsUri){
|
| URI fileUri = rootUri.resolve(relPath);
|
| - if (new File(fileUri).exists()){
|
| - return fileUri;
|
| + File file = new File(fileUri);
|
| + if (file.exists()){
|
| + try {
|
| + return file.getCanonicalFile().toURI();
|
| + } catch (IOException e) {
|
| + file.toURI();
|
| + }
|
| }
|
| }
|
| // don't return null for package scheme
|
| @@ -254,7 +260,11 @@
|
| fileUri = getResolvedPackageUri(uri, rootUri);
|
| File file = new File(fileUri);
|
| if (file.exists()){
|
| - return file.toURI();
|
| + try {
|
| + return file.getCanonicalFile().toURI();
|
| + } catch (IOException e) {
|
| + return file.toURI();
|
| + }
|
| }
|
| }
|
| // resolve against first package root
|
| @@ -263,6 +273,7 @@
|
| }
|
| return uri;
|
| }
|
| +
|
|
|
| /**
|
| * Given a uri, resolve against the list of package roots, used to find generated files
|
|
|