[pve-devel] [PATCH v2 guest-common 4/8] vzdump: command line: make sure mailto is comma-separated

Fabian Ebner f.ebner at proxmox.com
Mon Feb 15 13:24:58 CET 2021


In addition to relying on shellquote(), it's still nice to avoid printing out
unnecessary whitespaces, especially newlines.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

New in v2.

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

diff --git a/PVE/VZDump/Common.pm b/PVE/VZDump/Common.pm
index eceea7f..5d93b51 100644
--- a/PVE/VZDump/Common.pm
+++ b/PVE/VZDump/Common.pm
@@ -394,6 +394,7 @@ sub command_line {
 		$cmd .= " --$p " . PVE::Tools::shellquote($path);
 	    }
 	} else {
+	    $v = join(",", PVE::Tools::split_list($v)) if $p eq 'mailto';
 	    $v = PVE::JSONSchema::print_property_string($v, 'prune-backups')
 		if $p eq 'prune-backups';
 
-- 
2.20.1





More information about the pve-devel mailing list