Restore the -a option

This commit is contained in:
Peltoche 2018-11-24 15:50:26 +01:00
parent b0adc11215
commit cdd9dc1a70
No known key found for this signature in database
GPG key ID: CED68D0487156952

View file

@ -31,7 +31,7 @@ impl<'a> Core<'a> {
} else if path.is_file() { } else if path.is_file() {
match LongMeta::from_path(path) { match LongMeta::from_path(path) {
Ok(meta) => files.push(meta), Ok(meta) => files.push(meta),
Err(err) => println!("err tu: {}", err), Err(err) => println!("err : {}", err),
}; };
} else { } else {
match path.metadata() { match path.metadata() {
@ -75,8 +75,12 @@ impl<'a> Core<'a> {
for entry in dir { for entry in dir {
if let Ok(entry) = entry { if let Ok(entry) = entry {
match LongMeta::from_path(entry.path().as_path()) { match LongMeta::from_path(entry.path().as_path()) {
Ok(meta) => content.push(meta), Ok(meta) => {
Err(err) => println!("err tu 2: {}", err), if !meta.name.starts_with('.') || self.options.display_all {
content.push(meta);
}
}
Err(err) => println!("err 2: {}", err),
} }
} }
} }