mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-12-27 10:22:40 +00:00
Fix bug where xattr '@' characters weren't shown
The `--long` flag should show the '@' character in the permissions list if that feature has been compiled in, but only the `--extended` flag should actually show their keys, rather than just their presence.
This commit is contained in:
parent
7f980935c5
commit
4c3266310d
@ -214,6 +214,7 @@ impl Details {
|
|||||||
use num_cpus;
|
use num_cpus;
|
||||||
use scoped_threadpool::Pool;
|
use scoped_threadpool::Pool;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
|
use feature::xattr;
|
||||||
|
|
||||||
let mut pool = Pool::new(num_cpus::get() as u32);
|
let mut pool = Pool::new(num_cpus::get() as u32);
|
||||||
let mut file_eggs = Vec::new();
|
let mut file_eggs = Vec::new();
|
||||||
@ -236,25 +237,21 @@ impl Details {
|
|||||||
|
|
||||||
scoped.execute(move || {
|
scoped.execute(move || {
|
||||||
let mut errors = Vec::new();
|
let mut errors = Vec::new();
|
||||||
|
|
||||||
let mut xattrs = Vec::new();
|
let mut xattrs = Vec::new();
|
||||||
|
|
||||||
|
if xattr::ENABLED {
|
||||||
match file.path.attributes() {
|
match file.path.attributes() {
|
||||||
Ok(xs) => {
|
Ok(xs) => xattrs.extend(xs),
|
||||||
if self.xattr {
|
Err(e) => errors.push((e, None)),
|
||||||
for xattr in xs {
|
|
||||||
xattrs.push(xattr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Err(e) => {
|
|
||||||
if self.xattr {
|
|
||||||
errors.push((e, None));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
let cells = table.cells_for_file(&file, !xattrs.is_empty());
|
let cells = table.cells_for_file(&file, !xattrs.is_empty());
|
||||||
|
|
||||||
|
if !table.opts.xattr {
|
||||||
|
xattrs.clear();
|
||||||
|
}
|
||||||
|
|
||||||
let mut dir = None;
|
let mut dir = None;
|
||||||
|
|
||||||
if let Some(r) = self.recurse {
|
if let Some(r) = self.recurse {
|
||||||
|
Loading…
Reference in New Issue
Block a user