mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 01:46:08 +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:
parent
b434ceea29
commit
fe7b6a4431
@ -862,6 +862,11 @@ RESCAN:
|
|||||||
my $end = $hash->{pos}{"$inf:$from"};
|
my $end = $hash->{pos}{"$inf:$from"};
|
||||||
my $start = $end - 1024;
|
my $start = $end - 1024;
|
||||||
$start = 0 if($start < 0);
|
$start = 0 if($start < 0);
|
||||||
|
|
||||||
|
$ifh->seek($end, 0);
|
||||||
|
my $l = <$ifh>;
|
||||||
|
$end = $ifh->tell if($l && $l lt $from);
|
||||||
|
|
||||||
$ifh->seek($start, 0);
|
$ifh->seek($start, 0);
|
||||||
sysread($ifh, $buf, $end-$start);
|
sysread($ifh, $buf, $end-$start);
|
||||||
@rescanArr = split("\n", $buf);
|
@rescanArr = split("\n", $buf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user