minor refactor of return value

This commit is contained in:
Jay 2020-05-12 14:20:49 +01:00 committed by Abin Simon
parent 3def8d0238
commit 0f8b558493

View file

@ -192,10 +192,10 @@ impl Meta {
// the link, but provides whether followed link is_dir. Broken links are files. // the link, but provides whether followed link is_dir. Broken links are files.
( (
path.symlink_metadata()?, path.symlink_metadata()?,
match path.metadata() { Some(match path.metadata() {
Ok(m) => Some(m.is_dir()), Ok(m) => m.is_dir(),
Err(_) => Some(false), // broken link Err(_) => false, // broken link
}, }),
) )
} else { } else {
(path.metadata()?, None) (path.metadata()?, None)