1
Fork 0

Utilize entry.metadata over fs::symlink_metadata

This commit is contained in:
Mark Rousskov 2019-06-21 12:53:32 -04:00
parent 38f0b90e45
commit d619e44a55

View file

@ -35,7 +35,7 @@ pub fn check(path: &Path, bad: &mut bool) {
return; return;
} }
let metadata = t!(fs::symlink_metadata(&file), &file); let metadata = t!(entry.metadata(), file);
if metadata.mode() & 0o111 != 0 { if metadata.mode() & 0o111 != 0 {
let rel_path = file.strip_prefix(path).unwrap(); let rel_path = file.strip_prefix(path).unwrap();
let git_friendly_path = rel_path.to_str().unwrap().replace("\\", "/"); let git_friendly_path = rel_path.to_str().unwrap().replace("\\", "/");