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

Unified Diff: pkg/analyzer/lib/file_system/memory_file_system.dart

Issue 2714373002: fix MemoryResourceProvider context on Windows (Closed)
Patch Set: merge Created 3 years, 10 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/test/src/context/builder_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/file_system/memory_file_system.dart
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
index 20f69e7260ee59dd0f2e8c3c18e04ec223e7c684..3cab6ee8995aed9cfaed5d5a10d6a66cc98174a8 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -36,7 +36,12 @@ class MemoryResourceProvider implements ResourceProvider {
MemoryResourceProvider(
{pathos.Context context, @deprecated bool isWindows: false})
- : _pathContext = (context ??= pathos.context),
+ : _pathContext = (context ??= pathos.style == pathos.Style.windows
+ // On Windows, ensure that the current drive matches
+ // the drive inserted by MemoryResourceProvider.convertPath
+ // so that packages are mapped to the correct drive
+ ? new pathos.Context(current: 'C:\\')
+ : pathos.context),
absolutePathContext =
new AbsolutePathContext(context.style == pathos.Style.windows);
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/builder_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698