From cdd9dc1a70a3280e4f4362eba08b187b8a18d50c Mon Sep 17 00:00:00 2001 From: Peltoche Date: Sat, 24 Nov 2018 15:50:26 +0100 Subject: [PATCH] Restore the -a option --- src/core.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core.rs b/src/core.rs index 7f1670d..c7a2217 100644 --- a/src/core.rs +++ b/src/core.rs @@ -31,7 +31,7 @@ impl<'a> Core<'a> { } else if path.is_file() { match LongMeta::from_path(path) { Ok(meta) => files.push(meta), - Err(err) => println!("err tu: {}", err), + Err(err) => println!("err : {}", err), }; } else { match path.metadata() { @@ -75,8 +75,12 @@ impl<'a> Core<'a> { for entry in dir { if let Ok(entry) = entry { match LongMeta::from_path(entry.path().as_path()) { - Ok(meta) => content.push(meta), - Err(err) => println!("err tu 2: {}", err), + Ok(meta) => { + if !meta.name.starts_with('.') || self.options.display_all { + content.push(meta); + } + } + Err(err) => println!("err 2: {}", err), } } }