mirror of
https://github.com/nushell/nushell.git
synced 2024-11-30 04:14:17 +01:00
tolerate os error while executing ls command (#2466)
This commit is contained in:
parent
3f443f40d0
commit
dd4351e2b7
@ -154,7 +154,7 @@ impl Shell for FilesystemShell {
|
|||||||
let metadata = match std::fs::symlink_metadata(&path) {
|
let metadata = match std::fs::symlink_metadata(&path) {
|
||||||
Ok(metadata) => Some(metadata),
|
Ok(metadata) => Some(metadata),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
if e.kind() == ErrorKind::PermissionDenied {
|
if e.kind() == ErrorKind::PermissionDenied || e.kind() == ErrorKind::Other {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
return Some(Err(e.into()));
|
return Some(Err(e.into()));
|
||||||
|
Loading…
Reference in New Issue
Block a user