]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/LvmThinPlugin.pm
lvmthin: Match snapshot remove regex to allowed names
[pve-storage.git] / PVE / Storage / LvmThinPlugin.pm
index d1c5b1f6c60d3292191be383bfc23303fd4cb63c..c9e127ce0cb5a170f991f8704dc3a9660c54e977 100644 (file)
@@ -117,7 +117,7 @@ sub free_image {
 
        # remove all volume snapshots first
        foreach my $lv (keys %$dat) {
-           next if $lv !~ m/^snap_${volname}_(\w+)$/;
+           next if $lv !~ m/^snap_${volname}_${PVE::JSONSchema::CONFIGID_RE}$/;
            my $cmd = ['/sbin/lvremove', '-f', "$vg/$lv"];
            run_command($cmd, errmsg => "lvremove snapshot '$vg/$lv' error");
        }