[pve-devel] applied: [PATCH v2 storage 1/2] fix #2226: ignore broken symlinks in *_list
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Jun 17 11:55:06 CEST 2019
On 6/17/19 11:05 AM, Stefan Reiter wrote:
> Broken symlinks (and other files without a size) will now show up as 0
> byte instead of causing a format validation error in the API.
>
> Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
> ---
applied, please try to include a (short) change log between this and
the previous version here in this area, thanks!
> PVE/Storage.pm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/Storage.pm b/PVE/Storage.pm
> index 588e775..0ce942a 100755
> --- a/PVE/Storage.pm
> +++ b/PVE/Storage.pm
> @@ -800,7 +800,7 @@ sub snippets_list {
> push @{$res->{$sid}}, {
> volid => "$sid:snippets/". basename($fn),
> format => 'snippet',
> - size => -s $fn,
> + size => -s $fn // 0,
> };
> }
> }
> @@ -867,7 +867,7 @@ sub template_list {
> $info = { volid => "$sid:backup/$1", format => $2 };
> }
>
> - $info->{size} = -s $fn;
> + $info->{size} = -s $fn // 0;
>
> push @{$res->{$sid}}, $info;
> }
>
More information about the pve-devel
mailing list