From 9f0772fb65c283d5091a27087c50152a88116b18 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Tue, 8 Sep 2020 18:23:11 +0400 Subject: [PATCH] Additional image files check after download --- .../mage/plugins/card/images/DownloadPicturesService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPicturesService.java b/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPicturesService.java index 01cf9461ae..7790f8ac53 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPicturesService.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPicturesService.java @@ -117,6 +117,11 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements instance.uiDialog.showDialog(); instance.uiDialog.dispose(); instance.setNeedCancel(true); + + // IMAGES CHECK (download process can broke some files, so fix it here too) + // code executes on cancel/close download dialog (but not executes on app's close -- it's ok) + logger.info("Images: search broken files..."); + CardImageUtils.checkAndFixImageFiles(); } public boolean isNeedCancel() {