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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/util/ResourceUtil.java

Issue 8371019: Fix a URI related problem on windows. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/util/ResourceUtil.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/util/ResourceUtil.java (revision 623)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/util/ResourceUtil.java (working copy)
@@ -15,6 +15,7 @@
import com.google.dart.compiler.Source;
import com.google.dart.compiler.SystemLibraryManager;
+import com.google.dart.tools.core.DartCore;
import com.google.dart.tools.core.utilities.net.URIUtilities;
import org.eclipse.core.resources.IFile;
@@ -37,15 +38,18 @@
if (source == null) {
return null;
}
+
+ URI uri = URIUtilities.safelyResolveDartUri(source.getUri());
+
try {
- URI uri = URIUtilities.safelyResolveDartUri(source.getUri());
if (uri.isAbsolute() && "file".equals(uri.getScheme())) {
return new File(uri);
}
String relativePath = uri.getPath();
return new File(new File(".").getAbsoluteFile(), relativePath);
} catch (IllegalArgumentException ex) {
- // Thrown if the url was not a legal file url.
+ DartCore.logError("Illegal file URI: " + uri, ex);
+
return null;
}
}

Powered by Google App Engine
This is Rietveld 408576698