From e0d2a14d0f354c52032bbdcaffcf15765f576e33 Mon Sep 17 00:00:00 2001 From: Cameron Cordes Date: Wed, 24 Feb 2021 22:28:46 -0500 Subject: [PATCH] Report path when an image fails to open --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index b3035c3..3549230 100644 --- a/src/main.rs +++ b/src/main.rs @@ -275,9 +275,9 @@ fn create_thumbnails() { !thumb_path.exists() }) .map(|entry| (image::open(entry.path()), entry.path().to_path_buf())) - .filter(|(img, _)| { + .filter(|(img, path)| { if let Err(e) = img { - error!("Unable to open image: {}", e); + error!("Unable to open image: {:?}. {}", path, e); } img.is_ok() })