mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 17:26:34 +00:00
HMInfo:correct template read for readonly files
git-svn-id: https://svn.fhem.de/fhem/trunk@12917 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
af5284eb35
commit
4f2791efed
@ -921,17 +921,17 @@ sub HMinfo_listOfTempTemplates() { ############################################
|
||||
my $tDefault = $dir.$tFiles[0].":";
|
||||
my @tmpl;
|
||||
foreach my $fn (map{$dir.$_}@tFiles){
|
||||
if (!(-r $fn)){
|
||||
next;
|
||||
}
|
||||
next if (!(-r $fn));
|
||||
|
||||
open(aSave, "$fn") || return("Can't open $fn: $!");
|
||||
while(<aSave>){
|
||||
chomp;
|
||||
my $line = $_;
|
||||
$line =~ s/\r//g;
|
||||
if($line =~ m/^entities:(.*)/){
|
||||
$1 =~s/.*://;
|
||||
push @tmpl,map{"$fn:$_"}split(",",$1);
|
||||
my $l =$1;
|
||||
$l =~s/.*://;
|
||||
push @tmpl,map{"$fn:$_"}split(",",$l);
|
||||
}
|
||||
}
|
||||
close (aSave);
|
||||
|
Loading…
x
Reference in New Issue
Block a user