mirror of
git://git.proxmox.com/git/pve-zsync.git
synced 2025-03-10 16:58:41 +03:00
parse cron: properly split commandline
Reported in the community forum: https://forum.proxmox.com/threads/105254/ Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
e0bbdc77d9
commit
6345e47d7e
@ -9,6 +9,7 @@ use File::Path qw(make_path);
|
||||
use JSON;
|
||||
use IO::File;
|
||||
use String::ShellQuote 'shell_quote';
|
||||
use Text::ParseWords;
|
||||
|
||||
my $PROGNAME = "pve-zsync";
|
||||
my $CONFIG_PATH = "/var/lib/${PROGNAME}";
|
||||
@ -308,8 +309,7 @@ sub parse_cron {
|
||||
my $cfg = {};
|
||||
|
||||
while (my $line = shift(@text)) {
|
||||
|
||||
my @arg = split('\s', $line);
|
||||
my @arg = Text::ParseWords::shellwords($line);
|
||||
my $param = parse_argv(@arg);
|
||||
|
||||
if ($param->{source} && $param->{dest}) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user