[pve-devel] [PATCH guest-common v3 1/1] vzdump: change 'exclude-path' from alist to an array format
Dominik Csapak
d.csapak at proxmox.com
Tue Jun 6 15:08:50 CEST 2023
to get rid of the '-alist' format
Acked-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/PVE/VZDump/Common.pm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/PVE/VZDump/Common.pm b/src/PVE/VZDump/Common.pm
index 4b0e8e0..7d3c311 100644
--- a/src/PVE/VZDump/Common.pm
+++ b/src/PVE/VZDump/Common.pm
@@ -154,11 +154,14 @@ my $confdesc = {
optional => 1,
},
'exclude-path' => {
- type => 'string', format => 'string-alist',
+ type => 'array',
description => "Exclude certain files/directories (shell globs)." .
" Paths starting with '/' are anchored to the container's root, " .
" other paths match relative to each subdirectory.",
optional => 1,
+ items => {
+ type => 'string',
+ },
},
mailto => {
type => 'string',
@@ -422,7 +425,7 @@ sub command_line {
my $v = $param->{$p};
my $pd = $confdesc->{$p} || die "no such vzdump option '$p'\n";
if ($p eq 'exclude-path') {
- foreach my $path (split(/\0/, $v || '')) {
+ foreach my $path (@$v) {
$cmd .= " --$p " . PVE::Tools::shellquote($path);
}
} else {
--
2.30.2
More information about the pve-devel
mailing list