[pve-devel] [PATCH guest-common] vzdump: print prune-backups options in command_line correctly
Fabian Ebner
f.ebner at proxmox.com
Tue Nov 24 11:14:38 CET 2020
Otherwise it prints the hash reference instead of the prune options.
Signed-off-by: Fabian Ebner <f.ebner at 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
More information about the pve-devel
mailing list