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

Unified Diff: lib/src/package.dart

Issue 1228683003: Fix various pub issues. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 5 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: lib/src/package.dart
diff --git a/lib/src/package.dart b/lib/src/package.dart
index fa111a4bc8a4e150bd7815db2a245a58959aac11..f713e9f4a1fe5992efb8dbb528898ba055d8e280 100644
--- a/lib/src/package.dart
+++ b/lib/src/package.dart
@@ -190,6 +190,9 @@ class Package {
/// convert them to paths relative to the package root, use [relative].
List<String> listFiles({String beneath, bool recursive: true,
bool useGitIgnore: false}) {
+ // An in-memory package has no files.
+ if (dir == null) return [];
+
if (beneath == null) {
beneath = dir;
} else {
« lib/src/dart.dart ('K') | « lib/src/log.dart ('k') | lib/src/pubspec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698