[pve-devel] [PATCH pve-storage] esxi: anchor vmdk regex in `parse_volname`

Shannon Sterz s.sterz at proxmox.com
Tue Dec 10 10:16:25 CET 2024


otherwise, `volname.vmdk.raw` would be picked up as a `vmdk` formatted
image, which may not be desired.

Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
---
 src/PVE/Storage/ESXiPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index ae10511..37f9e75 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -421,7 +421,7 @@ sub parse_volname {
     return ('import', $volname, 0, undef, undef, undef, 'vmx') if $volname =~ /\.vmx$/;
 
     my $format = 'raw';
-    $format = 'vmdk'  if $volname =~ /\.vmdk/;
+    $format = 'vmdk' if $volname =~ /\.vmdk$/;
     return ('images', $volname, 0, undef, undef, undef, $format);
 }
 
-- 
2.39.5





More information about the pve-devel mailing list