timeshift: fix bug that can cause failure when seeking hits start of file
this resulted in a failed read that terminated the timeshift buffer.
This commit is contained in:
parent
c54c91becd
commit
229a8d75d8
1 changed files with 2 additions and 4 deletions
|
@ -322,12 +322,10 @@ static int _timeshift_read
|
|||
#endif
|
||||
*fd = open((*cur_file)->path, O_RDONLY);
|
||||
}
|
||||
if (*cur_off) {
|
||||
#ifdef TSHFT_TRACE
|
||||
tvhlog(LOG_DEBUG, "timeshift", "ts %d seek to %lu", ts->id, *cur_off);
|
||||
tvhlog(LOG_DEBUG, "timeshift", "ts %d seek to %lu", ts->id, *cur_off);
|
||||
#endif
|
||||
lseek(*fd, *cur_off, SEEK_SET);
|
||||
}
|
||||
lseek(*fd, *cur_off, SEEK_SET);
|
||||
|
||||
/* Read msg */
|
||||
ssize_t r = _read_msg(*fd, sm);
|
||||
|
|
Loading…
Add table
Reference in a new issue