F OpenNebula/one#913: Fix regression after review refactor (#4072)

Signed-off-by: Guillermo Ramos <gramos@opennebula.io>
This commit is contained in:
Guillermo Ramos authored and GitHub committed 2026-02-20 14:11:42 +01:00
1 parent 47b26d9d57
commit cd00a4c87c
1 file changed
+5 -5
+5 -5
View File
@@ -163,7 +163,11 @@ def prepare_disks(kvm_vm, type)
end
# Recreate disk symlinks
if path.symlink?
if (m = path.to_s.match(%r{(/([0-9a-z]*).snap/.*)}))
# Persistent disks @ shared DS pointing to image datastore
target = path
lname = "disk.#{disk_id}"
elsif path.symlink?
target = path.readlink
lname = path
@@ -176,10 +180,6 @@ def prepare_disks(kvm_vm, type)
rm #{lname}
EOS
end
elsif (m = path.to_s.match(%r{(/([0-9a-z]*).snap/.*)}))
# Persistent disks @ shared DS pointing to image datastore
target = path
lname = "disk.#{disk_id}"
elsif (m = path.to_s.match(%r{(disk.([0-9]*).snap/.*)}))
# Disk snapshots
target = m[1]