Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/DartLibraryImpl.java |
=================================================================== |
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/DartLibraryImpl.java (revision 623) |
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/DartLibraryImpl.java (working copy) |
@@ -111,14 +111,11 @@ |
if (libraryFile == null) { |
return null; |
} |
- URI uri; |
- try { |
- // We need to use the 3-arg constructor of URI in order to properly escape file system chars. |
- uri = new URI("file", libraryFile.getPath(), null); |
- } catch (URISyntaxException e) { |
- throw new AssertionError(e); |
- } |
+ |
+ URI uri = libraryFile.toURI().normalize(); |
+ |
SystemLibraryManager libMgr = SystemLibraryManagerProvider.getSystemLibraryManager(); |
+ |
return new UrlLibrarySource(uri, libMgr); |
} |