mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 10:05:06 +03:00
Use symlink_metadata in tidy to avoid panicking on broken symlinks.
This commit is contained in:
@@ -35,7 +35,7 @@ pub fn check(path: &Path, bad: &mut bool) {
|
||||
return
|
||||
}
|
||||
|
||||
let metadata = t!(fs::metadata(&file), &file);
|
||||
let metadata = t!(fs::symlink_metadata(&file), &file);
|
||||
if metadata.mode() & 0o111 != 0 {
|
||||
println!("binary checked into source: {}", file.display());
|
||||
*bad = true;
|
||||
|
||||
Reference in New Issue
Block a user