From b21657eaa620ee4bb2dd09a900bc10a7d06df411 Mon Sep 17 00:00:00 2001 From: Jash Date: Sat, 14 Nov 2026 23:22:09 +0530 Subject: [PATCH] fix: report a failed S3 upload in Event CopyTo instead of copying to the local path and deleting the source refs #5924 --- scripts/ZoneMinder/lib/ZoneMinder/Event.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Event.pm b/scripts/ZoneMinder/lib/ZoneMinder/Event.pm index d24e0333d1..8fa954af75 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Event.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Event.pm @@ -780,7 +780,10 @@ sub CopyTo { $moved = 1; }; - Error($@) if $@; + if (my $err = $@) { + Error($err); + return "Failed to copy event $$self{Id} to S3: $err"; + } } # end if s3 } # end if s3f3