2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 01:06:04 +00:00

92_FileLog.pm: fix problem with rescan (Forum #88084)

git-svn-id: https://svn.fhem.de/fhem/trunk@16770 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2018-05-24 15:16:12 +00:00
parent b434ceea29
commit fe7b6a4431

View File

@ -862,6 +862,11 @@ RESCAN:
my $end = $hash->{pos}{"$inf:$from"};
my $start = $end - 1024;
$start = 0 if($start < 0);
$ifh->seek($end, 0);
my $l = <$ifh>;
$end = $ifh->tell if($l && $l lt $from);
$ifh->seek($start, 0);
sysread($ifh, $buf, $end-$start);
@rescanArr = split("\n", $buf);