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

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

Issue 566093003: Create binstubs for executables when activating a package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise! Created 6 years, 3 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/package.dart
diff --git a/sdk/lib/_internal/pub/lib/src/package.dart b/sdk/lib/_internal/pub/lib/src/package.dart
index 3dd84e2d253facf02d1f199f47644495037b39df..7d7b00bd9811454b2583c06dbabd014b18261f64 100644
--- a/sdk/lib/_internal/pub/lib/src/package.dart
+++ b/sdk/lib/_internal/pub/lib/src/package.dart
@@ -142,11 +142,18 @@ class Package {
/// If this is a Git repository, this will respect .gitignore; otherwise, it
/// will return all non-hidden, non-blacklisted files.
///
- /// If [beneath] is passed, this will only return files beneath that path. If
+ /// If [beneath] is passed, this will only return files beneath that path,
+ /// which is expected to be relative to the package's root directory. If
nweiz 2014/09/17 22:58:27 I think you missed an update for this in [Package.
Bob Nystrom 2014/09/18 19:17:53 Done.
/// [recursive] is true, this will return all files beneath that path;
/// otherwise, it will only return files one level beneath it.
List<String> listFiles({String beneath, recursive: true}) {
- if (beneath == null) beneath = dir;
+ if (beneath == null) {
+ beneath = dir;
+ } else {
+ beneath = path.join(dir, beneath);
+ }
+
+ if (!dirExists(beneath)) return [];
// This is used in some performance-sensitive paths and can list many, many
// files. As such, it leans more havily towards optimization as opposed to

Powered by Google App Engine
This is Rietveld 408576698