[pve-devel] [PATCH manager] api: backup: normalize 'dow' format when converting
Dominik Csapak
d.csapak at proxmox.com
Wed Nov 17 15:21:01 CET 2021
the old web ui sends the days as seperate parameters, which will
be concatenated by a null-byte in the api, causing it to land it this
way in the jobs.cfg
to fix this, split+join the list to get a well-formed dow list
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/API2/Backup.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/PVE/API2/Backup.pm b/PVE/API2/Backup.pm
index 3b1d5299..c4970bc3 100644
--- a/PVE/API2/Backup.pm
+++ b/PVE/API2/Backup.pm
@@ -52,6 +52,7 @@ my $convert_to_schedule = sub {
my $starttime = $job->{starttime};
my $dow = $job->{dow};
+ $dow = join(',', PVE::Tools::split_list($dow)) if defined($dow);
if (!$dow || $dow eq ALL_DAYS) {
return "$starttime";
--
2.30.2
More information about the pve-devel
mailing list