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

Unified Diff: pkg/analyzer/lib/source/embedder.dart

Issue 1612393002: fix embedder on Windows - fixes #25498 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed embedder and updated tests Created 4 years, 11 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 | « pkg/analyzer/lib/file_system/memory_file_system.dart ('k') | pkg/analyzer/test/source/embedder_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/source/embedder.dart
diff --git a/pkg/analyzer/lib/source/embedder.dart b/pkg/analyzer/lib/source/embedder.dart
index f77ff7c76dd12d577233a50989975e04e693cca3..97aa4c4d3eab398b6074327451b0acbc26bef174 100644
--- a/pkg/analyzer/lib/source/embedder.dart
+++ b/pkg/analyzer/lib/source/embedder.dart
@@ -156,7 +156,11 @@ class EmbedderUriResolver extends DartUriResolver {
@override
Uri restoreAbsolute(Source source) {
- Source sdkSource = dartSdk.fromFileUri(Uri.parse(source.fullName));
+ String path = source.fullName;
+ if (path.length > 3 && path[1] == ':' && path[2] == '\\') {
+ path = '/${path[0]}:${path.substring(2).replaceAll('\\', '/')}';
+ }
+ Source sdkSource = dartSdk.fromFileUri(Uri.parse('file://$path'));
return sdkSource?.uri;
}
}
« no previous file with comments | « pkg/analyzer/lib/file_system/memory_file_system.dart ('k') | pkg/analyzer/test/source/embedder_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698