Chromium Code Reviews| Index: utils/pub/directory_tree.dart |
| diff --git a/utils/pub/directory_tree.dart b/utils/pub/directory_tree.dart |
| index f5baa62376a5257a4ace59792da55917ebc616bd..696c41842f208b9fba3c596592d44a45dce71f61 100644 |
| --- a/utils/pub/directory_tree.dart |
| +++ b/utils/pub/directory_tree.dart |
| @@ -50,7 +50,7 @@ import 'path.dart' as path; |
| /// |-- absolute_test.dart |
| /// |-- all_test.dart |
| /// |-- basename_test.dart |
| -/// | (7 more...) |
| +/// | (7 more...) |
| /// |-- path_windows_test.dart |
| /// |-- relative_test.dart |
| /// '-- split_test.dart |
| @@ -109,7 +109,7 @@ void _draw(StringBuffer buffer, String prefix, bool isLast, |
| _draw(buffer, '$prefix$childPrefix', isLastChild, child, children[child]); |
| } |
| - if (childNames.length <= 10) { |
| + if (name == null || childNames.length <= 10) { |
|
Bob Nystrom
2012/12/13 01:07:01
The intent here is to never elide at the top level
|
| // Not too many, so show all the children. |
| for (var i = 0; i < childNames.length; i++) { |
| _drawChild(i == childNames.length - 1, childNames[i]); |
| @@ -123,7 +123,7 @@ void _draw(StringBuffer buffer, String prefix, bool isLast, |
| // Elide the middle ones. |
| buffer.add(prefix); |
| buffer.add(_getPrefix(name == null, isLast)); |
| - buffer.add('| (${childNames.length - 6} more...)\n'); |
| + buffer.add('| (${childNames.length - 6} more...)\n'); |
|
Bob Nystrom
2012/12/13 01:07:01
You'll need to update the test too.
|
| // Show the last few. |
| _drawChild(false, childNames[childNames.length - 3]); |