From 5541fdfcd1b94294fcd7d356c2948bb272d20b9f Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Wed, 11 May 2016 20:09:50 +0300 Subject: [PATCH] Use symlink_metadata in tidy to avoid panicking on broken symlinks. --- src/tools/tidy/src/bins.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/tidy/src/bins.rs b/src/tools/tidy/src/bins.rs index 43475f203d5..e91b8fb0967 100644 --- a/src/tools/tidy/src/bins.rs +++ b/src/tools/tidy/src/bins.rs @@ -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;