helpers: actualy future proof and allow also checking releases

ensuring the editor state is saved helps -.-

Reported-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-06-16 13:52:30 +02:00
parent e17312c99f
commit 56d28037b5

View 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;
}