public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Kral <d.kral@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH esxi-import-tools 2/2] fix #5587: add support for older version of vmx storage filepaths
Date: Wed, 21 Aug 2024 15:57:48 +0200	[thread overview]
Message-ID: <20240821135748.146822-3-d.kral@proxmox.com> (raw)
In-Reply-To: <20240821135748.146822-1-d.kral@proxmox.com>

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@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2024-08-21 13:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 13:57 [pve-devel] [PATCH storage/esxi-import-tools 0/2] fix #5587: compatibility for flatcased 'filename' property in vmx file Daniel Kral
2024-08-21 13:57 ` [pve-devel] [PATCH storage 1/2] esxi: fix #5587: add support for older version of vmx storage filepaths Daniel Kral
2024-08-21 13:57 ` Daniel Kral [this message]
2024-09-06 15:36 ` [pve-devel] applied-series: [PATCH storage/esxi-import-tools 0/2] fix #5587: compatibility for flatcased 'filename' property in vmx file Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240821135748.146822-3-d.kral@proxmox.com \
    --to=d.kral@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal