summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorBenjamin Sago <ogham@bsago.me>2016-04-11 07:48:23 +0100
committerBenjamin Sago <ogham@bsago.me>2016-04-11 07:48:23 +0100
commitf35d28d1b8e85b37f5dbca17014f4c0f62fa5c30 (patch)
tree01615619a3c3d21dd68454bc4959620e575ae941 /src/main.rs
parentc009a68ae54c1a01b0bfc6475bd448fa1c165a3e (diff)
Fix bug where the directory name was not printed
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index dc9f724..8c76738 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -69,11 +69,12 @@ impl Exa {
}
let no_files = files.is_empty();
+ let is_only_dir = dirs.len() == 1 && no_files;
+
if !no_files {
self.print_files(None, files);
}
- let is_only_dir = dirs.len() == 1;
self.print_dirs(dirs, no_files, is_only_dir);
}