mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
avoid undefined
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@1262 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
21617053b8
commit
ab3848db61
@ -190,12 +190,15 @@ FileLog_Get($@)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FileLog_Switch($hash);
|
FileLog_Switch($hash);
|
||||||
|
|
||||||
if($inf eq "-") {
|
if($inf eq "-") {
|
||||||
$inf = $hash->{currentlogfile};
|
$inf = $hash->{currentlogfile};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
my $linf = "$1/$inf" if($hash->{currentlogfile} =~ m,^(.*)/[^/]*$,o);
|
# Look for the file in the log directory...
|
||||||
|
my $linf = "$1/$inf" if($hash->{currentlogfile} =~ m,^(.*)/[^/]*$,);
|
||||||
|
return undef if(!$linf);
|
||||||
if(!-f $linf) {
|
if(!-f $linf) {
|
||||||
|
# ... or in the archivelog
|
||||||
$linf = AttrVal($hash->{NAME},"archivedir",".") ."/". $inf;
|
$linf = AttrVal($hash->{NAME},"archivedir",".") ."/". $inf;
|
||||||
return "Error: cannot access $linf" if(!-f $linf);
|
return "Error: cannot access $linf" if(!-f $linf);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user