[pve-devel] [PATCH zsync 08/10] parse disks: don't include colon in storage name variable

Fabian Ebner f.ebner at proxmox.com
Tue May 4 10:10:02 CEST 2021


in preparation to re-use it elsewhere.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 pve-zsync | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pve-zsync b/pve-zsync
index 101dc03..e4f927e 100755
--- 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)$/) {
 
-- 
2.20.1






More information about the pve-devel mailing list