mirror of
https://github.com/Llewellynvdm/exa.git
synced 2025-04-07 07:51:51 +00:00
Do not attempt to print nothing
This fixes a bug where an extra header line was printed when in --long --grid mode.
This commit is contained in:
parent
65967355a8
commit
6cf9274828
@ -70,11 +70,13 @@ impl Exa {
|
||||
}
|
||||
}
|
||||
|
||||
let any_files = files.is_empty();
|
||||
self.print_files(None, files);
|
||||
let no_files = files.is_empty();
|
||||
if !no_files {
|
||||
self.print_files(None, files);
|
||||
}
|
||||
|
||||
let is_only_dir = dirs.len() == 1;
|
||||
self.print_dirs(dirs, any_files, is_only_dir);
|
||||
self.print_dirs(dirs, no_files, is_only_dir);
|
||||
}
|
||||
|
||||
fn print_dirs(&self, dir_files: Vec<Dir>, mut first: bool, is_only_dir: bool) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user