mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-14 22:22:26 +00:00
Restore the -a option
This commit is contained in:
parent
b0adc11215
commit
cdd9dc1a70
1 changed files with 7 additions and 3 deletions
10
src/core.rs
10
src/core.rs
|
@ -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),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue