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

This commit is contained in:
Isaac Connor 2021-07-08 11:03:56 -04:00
parent c06cda6a65
commit 3e59ad9cb4
1 changed files with 4 additions and 0 deletions

View File

@ -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 ) {