[pve-devel] [PATCH esxi-import-tools 2/2] fix #5587: add support for older version of vmx storage filepaths

Daniel Kral d.kral at proxmox.com
Wed Aug 21 15:57:48 CEST 2024


Allow the ESXi storage disk entry property "fileName" to be flatcased
("filename") in addition to being camelcased ("fileName"). This adds
compatibility with older ESXi .vmx configuration files.

Signed-off-by: Daniel Kral <d.kral at proxmox.com>
---
 src/vmx.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vmx.rs b/src/vmx.rs
index 31cd52d..e1fa45b 100644
--- a/src/vmx.rs
+++ b/src/vmx.rs
@@ -6,7 +6,7 @@ use regex::Regex;
 use tokio::io::AsyncRead;
 
 static DISK_RE: Lazy<Regex> = Lazy::new(|| {
-    Regex::new(r#"^((?:scsi|ide|sata|nvme)\d+:\d+)\.fileName$"#)
+    Regex::new(r#"^((?:scsi|ide|sata|nvme)\d+:\d+)\.file[nN]ame$"#)
         .expect("failed to create disk key regex")
 });
 
-- 
2.39.2





More information about the pve-devel mailing list