mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
37_NotifyAndroidTV.pm: close opened files
git-svn-id: https://svn.fhem.de/fhem/trunk@16096 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
267000f457
commit
cbe486874e
@ -186,9 +186,12 @@ NotifyAndroidTV_Set($$@)
|
||||
|
||||
Log3 $name, 5, "$name: using icon $param_h->{icon}";
|
||||
|
||||
my $icon;
|
||||
local( *FH ) ;
|
||||
open( FH, $param_h->{icon} );
|
||||
my $icon = do { local( $/ ) ; <FH> } ;
|
||||
if( open( FH, $param_h->{icon} ) ) {
|
||||
$icon = do { local( $/ ) ; <FH> } ;
|
||||
close( FH );
|
||||
}
|
||||
|
||||
return "icon not found: $param_h->{icon}" if( !$icon );
|
||||
delete $param_h->{icon};
|
||||
@ -202,8 +205,10 @@ NotifyAndroidTV_Set($$@)
|
||||
Log3 $name, 5, "$name: using image $param_h->{image}";
|
||||
|
||||
local( *FH ) ;
|
||||
open( FH, $param_h->{image} );
|
||||
my $image = do { local( $/ ) ; <FH> } ;
|
||||
if( open( FH, $param_h->{image} ) ) {
|
||||
$image = do { local( $/ ) ; <FH> } ;
|
||||
close(FH);
|
||||
}
|
||||
|
||||
return "image not found: $param_h->{image}" if( !$image );
|
||||
delete $param_h->{image};
|
||||
|
Loading…
Reference in New Issue
Block a user