]> git.proxmox.com Git - qemu-server.git/commitdiff
helpers: actualy future proof and allow also checking releases
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 16 Jun 2023 11:52:30 +0000 (13:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 16 Jun 2023 11:53:52 +0000 (13:53 +0200)
ensuring the editor state is saved helps -.-

Reported-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer/Helpers.pm

index 68640dda13fbf8f5c72986a1912997a07f88b7bc..ee3979df872b5a726cd3694c68a1ab92ea1dc7cf 100644 (file)
@@ -178,7 +178,7 @@ sub pvecfg_min_version {
 
     return 0 if !$verstr;
 
-    if ($verstr =~ m/^(\d+)\.(\d+)(?:[.-](\d+))/) {
+    if ($verstr =~ m/^(\d+)\.(\d+)(?:[.-](\d+))?/) {
        return 1 if version_cmp($1, $major, $2, $minor, $3 // 0, $release) >= 0;
        return 0;
     }