Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/compiler/DartCompilerUtilities.java

Issue 9608003: Properly resolve relative paths with spaces (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/Library.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/compiler/DartCompilerUtilities.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/compiler/DartCompilerUtilities.java (revision 5115)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/compiler/DartCompilerUtilities.java (working copy)
@@ -55,6 +55,7 @@
import java.io.Reader;
import java.io.StringReader;
import java.net.URI;
+import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -320,7 +321,12 @@
@Override
public DartSource getSourceFor(String relPath) {
- URI uri = wrappedSource.getUri().resolve(relPath);
+ URI uri;
+ try {
+ uri = wrappedSource.getUri().resolve(new URI(null, null, relPath, null));
+ } catch (URISyntaxException e) {
+ uri = null;
+ }
if (uri != null) {
for (URI key : suppliedSources.keySet()) {
if (equalUris(libraryManager, key, uri)) {
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/analysis/Library.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698