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

Unified Diff: utils/pub/path_source.dart

Issue 12335076: Handle shared path dependencies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Compare resolved paths. Created 7 years, 10 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: utils/pub/path_source.dart
diff --git a/utils/pub/path_source.dart b/utils/pub/path_source.dart
index 31ea9fb75157abafeb77474340ffc1a47600c11f..bfa09e7a2129b9c8a0fd7f54f707fe22c1d97718 100644
--- a/utils/pub/path_source.dart
+++ b/utils/pub/path_source.dart
@@ -9,6 +9,8 @@ import 'dart:io';
import '../../pkg/pathos/lib/path.dart' as path;
+import 'log.dart' as log;
+
import 'io.dart';
import 'package.dart';
import 'pubspec.dart';
@@ -30,6 +32,13 @@ class PathSource extends Source {
});
}
+ bool descriptionsEqual(description1, description2) {
+ // Compare real paths after normalizing and resolving symlinks.
+ var path1 = new File(description1["path"]).fullPathSync();
+ var path2 = new File(description2["path"]).fullPathSync();
+ return path1 == path2;
+ }
+
Future<bool> install(PackageId id, String destination) {
return defer(() {
try {
@@ -44,7 +53,7 @@ class PathSource extends Source {
}
/// Parses a path dependency. This takes in a path string and returns a map.
- /// The "path" key will be the original path but resolves relative to the
+ /// The "path" key will be the original path but resolved relative to the
/// containing path. The "relative" key will be `true` if the original path
/// was relative.
///

Powered by Google App Engine
This is Rietveld 408576698