tolerate os error while executing ls command (#2466)

This commit is contained in:
gorogoroumaru 2020-09-01 02:14:37 +09:00 committed by GitHub
parent 3f443f40d0
commit dd4351e2b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,7 +154,7 @@ impl Shell for FilesystemShell {
let metadata = match std::fs::symlink_metadata(&path) {
Ok(metadata) => Some(metadata),
Err(e) => {
if e.kind() == ErrorKind::PermissionDenied {
if e.kind() == ErrorKind::PermissionDenied || e.kind() == ErrorKind::Other {
None
} else {
return Some(Err(e.into()));