Removed redundant error message when using hyperlinks if file is a broken symlink

This commit is contained in:
Kodi Craft 2022-05-19 19:32:57 +02:00 committed by Wei Zhang
parent dd2ef0aad6
commit 282224e353

View file

@ -118,8 +118,16 @@ impl Name {
}
}
Err(err) => {
print_error!("{}: {}.", name, err);
name
match err.kind() {
std::io::ErrorKind::NotFound => {
// If this happens, it just means the file is a broken symlink. This is not an error, and the user is already warned that the symlink is broken by the colors.
name
}
_ => {
print_error!("{}: {}", name, err);
name
}
}
}
}
}