]> git.proxmox.com Git - pve-zsync.git/commitdiff
fix to many slashes in recv pat
authorWolfgang Link <w.link@proxmox.com>
Tue, 3 Nov 2015 11:06:28 +0000 (12:06 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 3 Nov 2015 17:02:19 +0000 (18:02 +0100)
pve-zsync

index 4941456b664f7c803142e3fa751162a09061f533..1029b3000dc30f02da042137ae0869bde321d197 100644 (file)
--- a/pve-zsync
+++ b/pve-zsync
@@ -825,10 +825,13 @@ sub send_image {
        my $bwl = $param->{limit}*1024;
        push @$cmd, \'|', 'cstream', '-t', $bwl;
     }
+    my $target = "$dest->{all}/$source->{last_part}";
+    $target =~ s!/+!/!g;
+
     push @$cmd, \'|';
     push @$cmd, 'ssh', "root\@$dest->{ip}", '--' if $dest->{ip};
     push @$cmd, 'zfs', 'recv', '--';
-    push @$cmd, "$dest->{all}/$source->{last_part}\@$source->{new_snap}";
+    push @$cmd, "$target\@$source->{new_snap}";
 
     eval {
        run_cmd($cmd)