From dfa374d3205dea814642e30769db45bb37374c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 24 Mar 2021 13:24:41 +0100 Subject: [PATCH] fix #3363: avoid undef-warning for PBS crypt-mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it is optional after all, and missing (/None) for files stored in the snapshot dir but not referenced in the manifest for whatever reason. Signed-off-by: Fabian Grünbichler --- PVE/Storage/PBSPlugin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm index 6c6816e..df3aaab 100644 --- a/PVE/Storage/PBSPlugin.pm +++ b/PVE/Storage/PBSPlugin.pm @@ -527,7 +527,7 @@ my sub snapshot_files_encrypted { my $crypt = $file->{'crypt-mode'}; $all = 0 if !$crypt || $crypt ne 'encrypt'; - $any ||= $crypt eq 'encrypt'; + $any ||= defined($crypt) && $crypt eq 'encrypt'; } return $any && $all; }