5
0
mirror of git://git.proxmox.com/git/pve-zsync.git synced 2025-01-09 05:17:36 +03:00

fix to many slashes in recv pat

This commit is contained in:
Wolfgang Link 2015-11-03 12:06:28 +01:00 committed by Dietmar Maurer
parent 0be13fd9a2
commit 1193273e4e

View File

@ -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)