Otherwise it prints the hash reference instead of the prune options.

Signed-off-by: Fabian Ebner <f.eb...@proxmox.com>
---

AFAICT the result of the function was only used for printing, so this
should've been a cosmetic problem only.

 PVE/VZDump/Common.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/VZDump/Common.pm b/PVE/VZDump/Common.pm
index 63a4689..648c906 100644
--- a/PVE/VZDump/Common.pm
+++ b/PVE/VZDump/Common.pm
@@ -377,6 +377,10 @@ sub command_line {
            foreach my $path (split(/\0/, $v || '')) {
                $cmd .= " --$p " . PVE::Tools::shellquote($path);
            }
+       } elsif ($p eq 'prune-backups') {
+           my $property_string = PVE::JSONSchema::print_property_string($v, 
'prune-backups');
+           $cmd .= " --$p " . PVE::Tools::shellquote($property_string)
+               if defined($property_string) && $property_string ne '';
        } else {
            $cmd .= " --$p " . PVE::Tools::shellquote($v) if defined($v) && $v 
ne '';
        }
-- 
2.20.1



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

Reply via email to