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

Unified Diff: utils/pub/io.dart

Issue 11931040: adds file path source to pub (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase to newest as of 5 min ago Created 7 years, 11 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 | utils/pub/path_source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index b227378a28f552f3c541967d640d76d219dd0229..704d3d1e68525ddab0de45a5c5dd0357230d6286 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -398,7 +398,9 @@ Future<File> createSymlink(from, to) {
Future<File> createPackageSymlink(String name, from, to,
{bool isSelfLink: false}) {
// See if the package has a "lib" directory.
- from = join(from, 'lib');
+ // Note(Sam): Relative paths causes issues when cwd is different.
+ // also, absolute paths are safer when app is moved around.
+ from = getFullPath(join(from, 'lib'));
return dirExists(from).then((exists) {
log.fine("Creating ${isSelfLink ? "self" : ""}link for package '$name'.");
if (exists) return createSymlink(from, to);
« no previous file with comments | « no previous file | utils/pub/path_source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698