mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 02:25:05 +00:00
log, minor bug in reverse log reader, when reading clog files, the beginning of the file isn't detected. found while working on https://github.com/opnsense/core/issues/3831
This commit is contained in:
parent
7a1dc9fc10
commit
0844a5a27b
@ -61,6 +61,8 @@ def reverse_log_reader(filename, block_size=81920, start_pos=None):
|
||||
data = input_stream.read(block_size) + data
|
||||
# split stream using begin of line (bol) and end of line (eol)
|
||||
bol = data.rfind('\n')
|
||||
if bol == -1:
|
||||
bol = data.rfind('\u0000')
|
||||
eol = len(data)
|
||||
|
||||
while bol > -1:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user