mirror of https://github.com/sharkdp/fd.git
Add additional check for symlink
This commit is contained in:
parent
bbf0f1cc1f
commit
81dee25438
|
@ -312,7 +312,12 @@ fn spawn_senders(
|
||||||
path,
|
path,
|
||||||
err: inner_err,
|
err: inner_err,
|
||||||
}) => match inner_err.as_ref() {
|
}) => match inner_err.as_ref() {
|
||||||
ignore::Error::Io(io_error) if io_error.kind() == io::ErrorKind::NotFound => {
|
ignore::Error::Io(io_error)
|
||||||
|
if io_error.kind() == io::ErrorKind::NotFound
|
||||||
|
&& path
|
||||||
|
.symlink_metadata()
|
||||||
|
.map_or(false, |m| m.file_type().is_symlink()) =>
|
||||||
|
{
|
||||||
DirEntry::BrokenSymlink(path.to_owned())
|
DirEntry::BrokenSymlink(path.to_owned())
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
|
Loading…
Reference in New Issue