]> git.proxmox.com Git - pve-zsync.git/commitdiff
parse disks: don't include colon in storage name variable
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 4 May 2021 08:10:02 +0000 (10:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 4 May 2021 10:12:51 +0000 (12:12 +0200)
in preparation to re-use it elsewhere.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
pve-zsync

index 101dc03a085fa3253203b241ebdd7e7279644b32..e4f927e290e97ce63786ad3f0c11fad23e69e579 100755 (executable)
--- a/pve-zsync
+++ b/pve-zsync
@@ -858,7 +858,7 @@ sub parse_disks {
            my @parameter = split(/,/,$1);
 
            foreach my $opt (@parameter) {
-               if ($opt =~ m/^(?:file=|volume=)?([^:]+:)([A-Za-z0-9\-]+)$/){
+               if ($opt =~ m/^(?:file=|volume=)?([^:]+):([A-Za-z0-9\-]+)$/){
                    $disk = $2;
                    $stor = $1;
                    last;
@@ -872,10 +872,10 @@ sub parse_disks {
 
        my $cmd = [];
        push @$cmd, 'ssh', "$user\@$ip", '--' if $ip;
-       push @$cmd, 'pvesm', 'path', "$stor$disk";
+       push @$cmd, 'pvesm', 'path', "$stor:$disk";
        my $path = run_cmd($cmd);
 
-       die "Get no path from pvesm path $stor$disk\n" if !$path;
+       die "Get no path from pvesm path $stor:$disk\n" if !$path;
 
        if ($vm_type eq 'qemu' && $path =~ m/^\/dev\/zvol\/(\w+.*)(\/$disk)$/) {