public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH storage] archive_info: relax custom name handling
@ 2020-07-08 10:05 Fabian Grünbichler
  2020-07-08 13:26 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Grünbichler @ 2020-07-08 10:05 UTC (permalink / raw)
  To: pve-devel

we already differentiate between standard and non-standard names anyway
and don't detect and return the VMID in the latter case anyway. drop it
from the RE as well to allow names like 'vzdump-qemu-template.vma.lzo'
without the need for a fake VMID.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
we previously handled those names just fine, and this is affecting
existing usecases:

https://lists.proxmox.com/pipermail/pve-user/2020-July/171802.html

 PVE/Storage.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index ffa1484..edf9a2e 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -1393,7 +1393,7 @@ sub archive_info {
     my $info;
 
     my $volid = basename($archive);
-    if ($volid =~ /^(vzdump-(lxc|openvz|qemu)-\d+-.+\.(tgz$|tar|vma)(?:\.(${\PVE::Storage::Plugin::COMPRESSOR_RE}))?)$/) {
+    if ($volid =~ /^(vzdump-(lxc|openvz|qemu)-.+\.(tgz$|tar|vma)(?:\.(${\PVE::Storage::Plugin::COMPRESSOR_RE}))?)$/) {
 	my $filename = "$1"; # untaint
 	my ($type, $format, $comp) = ($2, $3, $4);
 	my $format_re = defined($comp) ? "$format.$comp" : "$format";
-- 
2.20.1





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: Re: [PATCH storage] archive_info: relax custom name handling
  2020-07-08 10:05 [pve-devel] [PATCH storage] archive_info: relax custom name handling Fabian Grünbichler
@ 2020-07-08 13:26 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2020-07-08 13:26 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Grünbichler

On 08.07.20 12:05, Fabian Grünbichler wrote:
> we already differentiate between standard and non-standard names anyway
> and don't detect and return the VMID in the latter case anyway. drop it
> from the RE as well to allow names like 'vzdump-qemu-template.vma.lzo'
> without the need for a fake VMID.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
> we previously handled those names just fine, and this is affecting
> existing usecases:
> 
> https://lists.proxmox.com/pipermail/pve-user/2020-July/171802.html
> 
>  PVE/Storage.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-08 13:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 10:05 [pve-devel] [PATCH storage] archive_info: relax custom name handling Fabian Grünbichler
2020-07-08 13:26 ` [pve-devel] applied: " Thomas Lamprecht

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