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

Unified Diff: utils/pub/package.dart

Issue 12659008: Fix a couple broken tests in pub/validator_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove "solo_". Created 7 years, 9 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/validator/compiled_dartdoc.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/package.dart
diff --git a/utils/pub/package.dart b/utils/pub/package.dart
index 8e96cbd243e699f5ca9401418ae5ee50d6c969b6..b7c2f9943a38659cedcb9c6f461ff85afdb4e9be 100644
--- a/utils/pub/package.dart
+++ b/utils/pub/package.dart
@@ -45,16 +45,17 @@ class Package {
/// chosen.
Future<String> get readmePath {
return listDir(dir).then((entries) {
- var readmes = entries.where((entry) => entry.contains(_README_REGEXP));
+ var readmes = entries.map(path.basename).
+ where((entry) => entry.contains(_README_REGEXP));
if (readmes.isEmpty) return;
- return readmes.min((readme1, readme2) {
+ return path.join(dir, readmes.min((readme1, readme2) {
var extensions1 = ".".allMatches(readme1).length;
var extensions2 = ".".allMatches(readme2).length;
var comparison = extensions1.compareTo(extensions2);
if (comparison != 0) return comparison;
return readme1.compareTo(readme2);
- });
+ }));
});
}
« no previous file with comments | « no previous file | utils/pub/validator/compiled_dartdoc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698