Signed-off-by: Fiona Ebner <f.eb...@proxmox.com>
---
 PVE/VZDump.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 9ef3c7b4..a04837e7 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -1287,9 +1287,9 @@ sub exec_backup {
     };
     my $err = $@;
 
-    $self->run_hook_script ('job-abort', undef, $job_end_fd) if $err;
-
     if ($err) {
+       eval { $self->run_hook_script ('job-abort', undef, $job_end_fd); };
+       $err .= $@ if $@;
        debugmsg ('err', "Backup job failed - $err", undef, 1);
     } else {
        if ($errcount) {
-- 
2.30.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to