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

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

Issue 2239303004: Normalize paths in PhysicalResourceProvider.getFile()/getFolder(). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/context/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/file_system/physical_file_system.dart
diff --git a/pkg/analyzer/lib/file_system/physical_file_system.dart b/pkg/analyzer/lib/file_system/physical_file_system.dart
index 8b8618e2a16a68bd5420ca20ffb25467b9a956ff..b37fd72f7a9275e3a4bbc9643bcd25cac11dc86b 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -72,10 +72,16 @@ class PhysicalResourceProvider implements ResourceProvider {
Context get pathContext => io.Platform.isWindows ? windows : posix;
@override
- File getFile(String path) => new _PhysicalFile(new io.File(path));
+ File getFile(String path) {
+ path = normalize(path);
Brian Wilkerson 2016/08/12 17:43:33 Should this be "pathContext.normalize()"?
scheglov 2016/08/12 18:02:50 It could be, but it does not have to. We has "pat
+ return new _PhysicalFile(new io.File(path));
+ }
@override
- Folder getFolder(String path) => new _PhysicalFolder(new io.Directory(path));
+ Folder getFolder(String path) {
+ path = normalize(path);
+ return new _PhysicalFolder(new io.Directory(path));
+ }
@override
Future<List<int>> getModificationTimes(List<Source> sources) async {
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698