From a2813620150fe842de7337004d15b94aff7564a9 Mon Sep 17 00:00:00 2001 From: Wolfgang Link Date: Wed, 15 Jun 2016 08:10:33 +0200 Subject: [PATCH] fix use path as source --- pve-zsync | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pve-zsync b/pve-zsync index 440ab56..779c5d4 100644 --- a/pve-zsync +++ b/pve-zsync @@ -477,11 +477,11 @@ sub init { run_cmd(['ssh-copy-id', '-i', '/root/.ssh/id_rsa.pub', "root\@$ip"]); } - die "Pool $dest->{all} does not exists\n" if check_pool_exists($dest); + die "Pool $dest->{all} does not exists\n" if !check_pool_exists($dest); - my $check = check_pool_exists($source->{path}, $source->{ip}) if !$source->{vmid} && $source->{path}; - - die "Pool $source->{path} does not exists\n" if undef($check); + if (!defined($source->{vmid})) { + die "Pool $source->{all} does not exists\n" if !check_pool_exists($source); + } my $vm_type = vm_exists($source); $job->{vm_type} = $vm_type; -- 2.39.2