5
0
mirror of git://git.proxmox.com/git/pve-zsync.git synced 2025-01-31 09:46:59 +03:00

fix #1587: sync: check if job state is defined

just because the $job hash is populated it's state key doesn't needs
to be..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2018-11-19 17:56:32 +01:00 committed by Wolfgang Bumiller
parent c9e2de9409
commit 9039b8bf87

View File

@ -574,7 +574,7 @@ sub sync {
$job = get_job($param);
};
if ($job && $job->{state} eq "syncing") {
if ($job && defined($job->{state}) && $job->{state} eq "syncing") {
die "Job --source $param->{source} --name $param->{name} is syncing at the moment";
}