vzdump: anchor matches for pending and special sections

Otherwise, a snapshot with a name that includes "pending" will be
misinterpreted as the pending section.

Only affects the warning messages, but still confusing.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250127112923.31703-8-f.ebner@proxmox.com
This commit is contained in:
Fiona Ebner 2025-01-27 12:29:14 +01:00 committed by Thomas Lamprecht
parent 248349f25e
commit d4208c7cc6

View File

@ -237,9 +237,9 @@ sub assemble {
next if $line =~ m/^\#vzdump\#/; # just to be sure
next if $line =~ m/^\#qmdump\#/; # just to be sure
if ($line =~ m/^\[(.*)\]\s*$/) {
if ($1 =~ m/PENDING/i) {
if ($1 =~ m/^PENDING$/i) {
$found_pending = 1;
} elsif ($1 =~ m/special:cloudinit/) {
} elsif ($1 =~ m/^special:cloudinit$/) {
$found_cloudinit = 1;
} else {
$found_snapshot = 1;