@@ -39,27 +39,6 @@ List<int> _pathsToTimes(List<String> paths) {
39
39
}).toList ();
40
40
}
41
41
42
- /**
43
- * Return a (semi-)canonicalized version of [path] for the purpose of analysis.
44
- *
45
- * Using the built-in path's [canonicalize] results in fully lowercase paths on
46
- * Windows displayed to the user so this method uses [normalize] and then just
47
- * uppercases the drive letter on Windows to resolve the most common issues.
48
- */
49
- String _canonicalize (String path) {
50
- path = normalize (path);
51
- // Ideally we'd call path's [canonicalize] here to ensure that on
52
- // case-insensitive file systems that different casing paths resolved to the
53
- // same thing; however these paths are used both as both as part of the
54
- // identity and also to display to users in error messages so for now we only
55
- // canonicalize the drive letter to resolve the most common issues.
56
- // https://github.com/dart-lang/sdk/issues/32095
57
- if (io.Platform .isWindows && isAbsolute (path)) {
58
- path = path.substring (0 , 1 ).toUpperCase () + path.substring (1 );
59
- }
60
- return path;
61
- }
62
-
63
42
/**
64
43
* The name of the directory containing plugin specific subfolders used to
65
44
* store data across sessions.
@@ -111,13 +90,13 @@ class PhysicalResourceProvider implements ResourceProvider {
111
90
112
91
@override
113
92
File getFile (String path) {
114
- path = _canonicalize (path);
93
+ path = normalize (path);
115
94
return new _PhysicalFile (new io.File (path));
116
95
}
117
96
118
97
@override
119
98
Folder getFolder (String path) {
120
- path = _canonicalize (path);
99
+ path = normalize (path);
121
100
return new _PhysicalFolder (new io.Directory (path));
122
101
}
123
102
@@ -276,7 +255,7 @@ class _PhysicalFolder extends _PhysicalResource implements Folder {
276
255
277
256
@override
278
257
String canonicalizePath (String relPath) {
279
- return _canonicalize (join (path, relPath));
258
+ return normalize (join (path, relPath));
280
259
}
281
260
282
261
@override
0 commit comments