mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 01:09:47 +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}";
|
Log3 $name, 5, "$name: using icon $param_h->{icon}";
|
||||||
|
|
||||||
|
my $icon;
|
||||||
local( *FH ) ;
|
local( *FH ) ;
|
||||||
open( FH, $param_h->{icon} );
|
if( open( FH, $param_h->{icon} ) ) {
|
||||||
my $icon = do { local( $/ ) ; <FH> } ;
|
$icon = do { local( $/ ) ; <FH> } ;
|
||||||
|
close( FH );
|
||||||
|
}
|
||||||
|
|
||||||
return "icon not found: $param_h->{icon}" if( !$icon );
|
return "icon not found: $param_h->{icon}" if( !$icon );
|
||||||
delete $param_h->{icon};
|
delete $param_h->{icon};
|
||||||
@ -202,8 +205,10 @@ NotifyAndroidTV_Set($$@)
|
|||||||
Log3 $name, 5, "$name: using image $param_h->{image}";
|
Log3 $name, 5, "$name: using image $param_h->{image}";
|
||||||
|
|
||||||
local( *FH ) ;
|
local( *FH ) ;
|
||||||
open( FH, $param_h->{image} );
|
if( open( FH, $param_h->{image} ) ) {
|
||||||
my $image = do { local( $/ ) ; <FH> } ;
|
$image = do { local( $/ ) ; <FH> } ;
|
||||||
|
close(FH);
|
||||||
|
}
|
||||||
|
|
||||||
return "image not found: $param_h->{image}" if( !$image );
|
return "image not found: $param_h->{image}" if( !$image );
|
||||||
delete $param_h->{image};
|
delete $param_h->{image};
|
||||||
|
Loading…
Reference in New Issue
Block a user