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

Unified Diff: editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart

Issue 471053002: Issue 20520. JavaFile.toURI() should use absolute path. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | « no previous file | pkg/analyzer/lib/src/generated/java_io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart
diff --git a/editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart b/editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart
index 347463b9bd10f285d371bb00ccf2bf89b33eb84e..245bd04fdc3be12ecff0c30f4e4a89a9c184d778 100644
--- a/editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart
+++ b/editor/util/plugins/com.google.dart.java2dart/resources/java_io.dart
@@ -112,7 +112,10 @@ class JavaFile {
bool isDirectory() {
return _newDirectory().existsSync();
}
- Uri toURI() => pathos.toUri(_path);
+ Uri toURI() {
+ String path = getAbsolutePath();
+ return pathos.toUri(path);
+ }
String readAsStringSync() => _newFile().readAsStringSync();
int lastModified() {
if (!_newFile().existsSync()) return 0;
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/java_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698