mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-25 13:27:33 +00:00
Fix tree permissions bug
There was a bug where if you tried to recurse into a directory you didn’t have permission to read the contents of, the error would be ignored. It now displays the errors.
This commit is contained in:
parent
882ac489ce
commit
f4ddbf3849
@ -209,8 +209,9 @@ impl<'a> Render<'a> {
|
||||
|
||||
if let Some(r) = self.recurse {
|
||||
if file.is_directory() && r.tree && !r.is_too_deep(depth.0) {
|
||||
if let Ok(d) = file.to_dir(false) {
|
||||
dir = Some(d);
|
||||
match file.to_dir(false) {
|
||||
Ok(d) => { dir = Some(d); },
|
||||
Err(e) => { errors.push((e, None)) },
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,40 +2,49 @@
|
||||
[1;34md[33mr[31mw[32mx[0m[33mr[31mw[32mx[33mr[38;5;244m-[32mx[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m├──[0m [1;34mdirs[0m
|
||||
[1;34md[33mr[31mw[32mx[0m[33mr[31mw[32mx[33mr[38;5;244m-[32mx[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mno-xattrs_empty[0m
|
||||
[1;34md[0m[38;5;244m---------[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mno-xattrs_empty_forbidden[0m
|
||||
[38;5;244m│ │ └──[0m [31m<Permission denied (os error 13)>[0m
|
||||
[1;34md[33mr[31mw[32mx[0m[33mr[31mw[32mx[33mr[38;5;244m-[32mx[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mno-xattrs_one-file[0m
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ │ └──[0m file-in-question
|
||||
[1;34md[0m[38;5;244m---------[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mno-xattrs_one-file_forbidden[0m
|
||||
[38;5;244m│ │ └──[0m [31m<Permission denied (os error 13)>[0m
|
||||
[1;34md[33mr[31mw[32mx[0m[33mr[31mw[32mx[33mr[38;5;244m-[32mx[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mno-xattrs_two-files[0m
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ │ ├──[0m that-file
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ │ └──[0m this-file
|
||||
[1;34md[0m[38;5;244m---------[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mno-xattrs_two-files_forbidden[0m
|
||||
[38;5;244m│ │ └──[0m [31m<Permission denied (os error 13)>[0m
|
||||
[1;34md[33mr[31mw[32mx[0m[33mr[31mw[32mx[33mr[38;5;244m-[32mx[0m@ [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mone-xattr_empty[0m
|
||||
[38;5;244m│ │ └──[0m user.greeting (len 5)
|
||||
[1;34md[0m[38;5;244m---------[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mone-xattr_empty_forbidden[0m
|
||||
[38;5;244m│ │ └──[0m [31m<Permission denied (os error 13)>[0m
|
||||
[1;34md[33mr[31mw[32mx[0m[33mr[31mw[32mx[33mr[38;5;244m-[32mx[0m@ [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mone-xattr_one-file[0m
|
||||
[38;5;244m│ │ ├──[0m user.greeting (len 5)
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ │ └──[0m file-in-question
|
||||
[1;34md[0m[38;5;244m---------[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mone-xattr_one-file_forbidden[0m
|
||||
[38;5;244m│ │ └──[0m [31m<Permission denied (os error 13)>[0m
|
||||
[1;34md[33mr[31mw[32mx[0m[33mr[31mw[32mx[33mr[38;5;244m-[32mx[0m@ [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mone-xattr_two-files[0m
|
||||
[38;5;244m│ │ ├──[0m user.greeting (len 5)
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ │ ├──[0m that-file
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ │ └──[0m this-file
|
||||
[1;34md[0m[38;5;244m---------[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mone-xattr_two-files_forbidden[0m
|
||||
[38;5;244m│ │ └──[0m [31m<Permission denied (os error 13)>[0m
|
||||
[1;34md[33mr[31mw[32mx[0m[33mr[31mw[32mx[33mr[38;5;244m-[32mx[0m@ [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mtwo-xattrs_empty[0m
|
||||
[38;5;244m│ │ ├──[0m user.greeting (len 5)
|
||||
[38;5;244m│ │ └──[0m user.another_greeting (len 2)
|
||||
[1;34md[0m[38;5;244m---------[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mtwo-xattrs_empty_forbidden[0m
|
||||
[38;5;244m│ │ └──[0m [31m<Permission denied (os error 13)>[0m
|
||||
[1;34md[33mr[31mw[32mx[0m[33mr[31mw[32mx[33mr[38;5;244m-[32mx[0m@ [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mtwo-xattrs_one-file[0m
|
||||
[38;5;244m│ │ ├──[0m user.greeting (len 5)
|
||||
[38;5;244m│ │ ├──[0m user.another_greeting (len 2)
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ │ └──[0m file-in-question
|
||||
[1;34md[0m[38;5;244m---------[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mtwo-xattrs_one-file_forbidden[0m
|
||||
[38;5;244m│ │ └──[0m [31m<Permission denied (os error 13)>[0m
|
||||
[1;34md[33mr[31mw[32mx[0m[33mr[31mw[32mx[33mr[38;5;244m-[32mx[0m@ [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ ├──[0m [1;34mtwo-xattrs_two-files[0m
|
||||
[38;5;244m│ │ ├──[0m user.greeting (len 5)
|
||||
[38;5;244m│ │ ├──[0m user.another_greeting (len 2)
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ │ ├──[0m that-file
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ │ └──[0m this-file
|
||||
[1;34md[0m[38;5;244m---------[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m│ └──[0m [1;34mtwo-xattrs_two-files_forbidden[0m
|
||||
[38;5;244m│ └──[0m [31m<Permission denied (os error 13)>[0m
|
||||
[1;34md[33mr[31mw[32mx[0m[33mr[31mw[32mx[33mr[38;5;244m-[32mx[0m [38;5;244m-[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m└──[0m [1;34mfiles[0m
|
||||
.[1;33mr[31mw[0m[38;5;244m-[33mr[31mw[38;5;244m-[33mr[38;5;244m--[0m [1;32m0[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m ├──[0m no-xattrs
|
||||
.[38;5;244m---------[0m [1;32m0[0m cassowary [34m 1 Jan 12:34[0m [38;5;244m ├──[0m no-xattrs_forbidden
|
||||
|
Loading…
Reference in New Issue
Block a user