]> git.proxmox.com Git - pve-zsync.git/commitdiff
send_config: small code cleanup
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 1 Apr 2019 14:27:22 +0000 (16:27 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 1 Apr 2019 14:27:22 +0000 (16:27 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
pve-zsync

index e99cd3015c896ca36358c622d16cfdeca9acc4ac..473d35fb96fc8fcc0cc9b6e1e62a7dd104cf92c9 100755 (executable)
--- a/pve-zsync
+++ b/pve-zsync
@@ -968,7 +968,8 @@ sub send_config{
     my $source_target = $source->{vm_type} eq 'qemu' ? "$QEMU_CONF/$source->{vmid}.conf": "$LXC_CONF/$source->{vmid}.conf";
     my $dest_target_new ="$source->{vmid}.conf.$source->{vm_type}.$source->{new_snap}";
 
-    my $config_dir = $dest->{last_part} ?  "${CONFIG_PATH}/$dest->{last_part}" : $CONFIG_PATH;
+    my $config_dir = $CONFIG_PATH;
+    $config_dir .= "/$dest->{last_part}" if $dest->{last_part};
 
     $dest_target_new = $config_dir.'/'.$dest_target_new;