[pve-devel] [PATCH storage] fix #2226: ignore broken symlinks in template_list
Oguz Bektas
o.bektas at proxmox.com
Thu Jun 13 14:54:58 CEST 2019
hi,
i also noticed the same bug happens around line 800 (with snippets). can you also
fix that one too?
On Thu, Jun 13, 2019 at 02:30:05PM +0200, Stefan Reiter wrote:
> Broken symlinks will no longer be enumerated, thus not causing a
> format validation in content GUI due to the missing filesize.
>
> Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
> ---
> PVE/Storage.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/PVE/Storage.pm b/PVE/Storage.pm
> index 588e775..4486122 100755
> --- a/PVE/Storage.pm
> +++ b/PVE/Storage.pm
> @@ -869,7 +869,7 @@ sub template_list {
>
> $info->{size} = -s $fn;
>
> - push @{$res->{$sid}}, $info;
> + push @{$res->{$sid}}, $info if $info->{size};
> }
>
> }
> --
> 2.20.1
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list