[pve-devel] [PATCH storage] fix #2226: ignore broken symlinks in template_list

Stefan Reiter s.reiter at proxmox.com
Thu Jun 13 14:30:05 CEST 2019


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





More information about the pve-devel mailing list