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

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

Issue 2542793003: Make MemoryResourceProvider.convertPath() work with partially posix paths. (Closed)
Patch Set: Created 4 years 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 | no next file » | 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 42731be1b09940893addb31a4f68e197b71bcd2d..20f69e7260ee59dd0f2e8c3c18e04ec223e7c684 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -50,10 +50,11 @@ class MemoryResourceProvider implements ResourceProvider {
* this class are never converted automatically.
*/
String convertPath(String path) {
- if (pathContext.style == pathos.windows.style &&
- path.startsWith(pathos.posix.separator)) {
- path = r'C:' +
- path.replaceAll(pathos.posix.separator, pathos.windows.separator);
+ if (pathContext.style == pathos.windows.style) {
+ if (path.startsWith(pathos.posix.separator)) {
+ path = r'C:' + path;
+ }
+ path = path.replaceAll(pathos.posix.separator, pathos.windows.separator);
}
return path;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698