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

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

Issue 14924006: Add a function to pub for finding the canonical path of a file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes 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
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/io.dart ('k') | sdk/lib/_internal/pub/pub.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7d6393598c1ea5f7d4e5e3eaf0baf39dfe4a0695..ac37ec72224a7fdba057ef69425ff61c7d45b6c0 100644
--- a/sdk/lib/_internal/pub/lib/src/path_source.dart
+++ b/sdk/lib/_internal/pub/lib/src/path_source.dart
@@ -34,8 +34,8 @@ class PathSource extends Source {
bool descriptionsEqual(description1, description2) {
try {
// Compare real paths after normalizing and resolving symlinks.
- var path1 = new File(description1["path"]).fullPathSync();
- var path2 = new File(description2["path"]).fullPathSync();
+ 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
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/io.dart ('k') | sdk/lib/_internal/pub/pub.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698