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

Unified Diff: sdk/lib/_internal/pub/lib/src/path_source.dart

Issue 15047005: Fix canonicalize(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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
Index: sdk/lib/_internal/pub/lib/src/path_source.dart
diff --git a/sdk/lib/_internal/pub/lib/src/path_source.dart b/sdk/lib/_internal/pub/lib/src/path_source.dart
index ac37ec72224a7fdba057ef69425ff61c7d45b6c0..2b66e3b6b5b228d3cf3335b52205d273dcd5238e 100644
--- a/sdk/lib/_internal/pub/lib/src/path_source.dart
+++ b/sdk/lib/_internal/pub/lib/src/path_source.dart
@@ -32,18 +32,10 @@ class PathSource extends Source {
}
bool descriptionsEqual(description1, description2) {
- try {
- // Compare real paths after normalizing and resolving symlinks.
- var path1 = canonicalize(description1["path"]);
- var path2 = canonicalize(description2["path"]);
- return path1 == path2;
- } on FileIOException catch (ex) {
- // If either of the files couldn't be found, fall back to just comparing
- // the normalized paths.
- var path1 = path.normalize(path.absolute(description1["path"]));
- var path2 = path.normalize(path.absolute(description2["path"]));
- return path1 == path2;
- }
+ // Compare real paths after normalizing and resolving symlinks.
+ var path1 = canonicalize(description1["path"]);
+ var path2 = canonicalize(description2["path"]);
+ return path1 == path2;
}
Future<bool> install(PackageId id, String destination) {

Powered by Google App Engine
This is Rietveld 408576698