mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 07:56:03 +00:00
01_FHEMWEB.pm: ignore damaged svg files (Forum #54743)
git-svn-id: https://svn.fhem.de/fhem/trunk@11690 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
10aa785a81
commit
186f3dc925
@ -2181,8 +2181,12 @@ FW_makeImage(@)
|
||||
if($p =~ m/\.svg$/i) {
|
||||
if(open(FH, "$FW_icondir/$p")) {
|
||||
my $data;
|
||||
do {
|
||||
do {
|
||||
$data = <FH>;
|
||||
if(!defined($data)) {
|
||||
Log 1, "$FW_icondir/$p is not useable";
|
||||
return "";
|
||||
}
|
||||
} until( $data =~ m/^<svg/ );
|
||||
$data .= join("", <FH>);
|
||||
close(FH);
|
||||
|
Loading…
x
Reference in New Issue
Block a user