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

Unified Diff: dart/pkg/dartdoc/mirrors/dart2js_mirror.dart

Issue 10914094: Improve [relativize] for Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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: dart/pkg/dartdoc/mirrors/dart2js_mirror.dart
diff --git a/dart/pkg/dartdoc/mirrors/dart2js_mirror.dart b/dart/pkg/dartdoc/mirrors/dart2js_mirror.dart
index 28aa56cae83650fd1d0b7bbfab9e1ae1e8cdf047..30c14b92b03e781047ac72cd143c9c7cd9ddbde6 100644
--- a/dart/pkg/dartdoc/mirrors/dart2js_mirror.dart
+++ b/dart/pkg/dartdoc/mirrors/dart2js_mirror.dart
@@ -282,6 +282,7 @@ class LibraryTypeCheckerTask extends TypeCheckerTask {
//------------------------------------------------------------------------------
class Dart2JsCompilation implements Compilation {
+ bool isWindows = (Platform.operatingSystem == 'windows');
api.Compiler _compiler;
Uri cwd;
bool isAborting = false;
@@ -295,10 +296,11 @@ class Dart2JsCompilation implements Compilation {
try {
source = readAll(uriPathToNative(uri.path));
} on FileIOException catch (ex) {
- throw 'Error: Cannot read "${relativize(cwd, uri)}" (${ex.osError}).';
+ throw 'Error: Cannot read "${relativize(cwd, uri, isWindows)}" '
+ '(${ex.osError}).';
}
sourceFiles[uri.toString()] =
- new SourceFile(relativize(cwd, uri), source);
+ new SourceFile(relativize(cwd, uri, isWindows), source);
return new Future.immediate(source);
}
« no previous file with comments | « dart/lib/compiler/implementation/util/uri_extras.dart ('k') | dart/tests/compiler/dart2js/uri_extras_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698