[pve-devel] [PATCH_V2 pve-container] fix to many slashes in recv pat

Wolfgang Link w.link at proxmox.com
Tue Nov 3 12:06:28 CET 2015


---
 pve-zsync | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pve-zsync b/pve-zsync
index 4941456..1029b30 100644
--- 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)
-- 
2.1.4





More information about the pve-devel mailing list