Report path when an image fails to open
All checks were successful
Core Repos/ImageApi/pipeline/pr-master This commit looks good

This commit is contained in:
Cameron Cordes
2021-02-24 22:28:46 -05:00
parent f9983240df
commit e0d2a14d0f

View File

@@ -275,9 +275,9 @@ fn create_thumbnails() {
!thumb_path.exists() !thumb_path.exists()
}) })
.map(|entry| (image::open(entry.path()), entry.path().to_path_buf())) .map(|entry| (image::open(entry.path()), entry.path().to_path_buf()))
.filter(|(img, _)| { .filter(|(img, path)| {
if let Err(e) = img { if let Err(e) = img {
error!("Unable to open image: {}", e); error!("Unable to open image: {:?}. {}", path, e);
} }
img.is_ok() img.is_ok()
}) })