From 14047bc820d6e6c30e8e89f363ebf0c407013a94 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 8 Jul 2021 11:03:56 -0400 Subject: [PATCH] Test for existence of file before adding it to zip. Apparently our glob can return the snapshot.jpg string even if it doesn't exist. This is a workaround to Archive::Zip not testing for failure and crashing. Fixes #3313 --- scripts/zmfilter.pl.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/zmfilter.pl.in b/scripts/zmfilter.pl.in index a086ed1aa..1f2906b4b 100644 --- a/scripts/zmfilter.pl.in +++ b/scripts/zmfilter.pl.in @@ -548,6 +548,10 @@ sub uploadArchFile { my $status = &AZ_OK; foreach my $imageFile ( @archImageFiles ) { + if (! -e $imageFile) { + Debug("Not adding $imageFile because it doesn't exist"); + next; + } Debug("Adding $imageFile"); my $member = $zip->addFile($imageFile); if ( !$member ) {