Merge pull request #228 from BtbN/fix_assert
Fix #1539 - assertion in timeshift reaper thread fired due to erroneous size updating
This commit is contained in:
commit
2da44d4810
1 changed files with 5 additions and 0 deletions
|
@ -149,7 +149,12 @@ void timeshift_filemgr_close ( timeshift_file_t *tsf )
|
|||
{
|
||||
ssize_t r = timeshift_write_eof(tsf->fd);
|
||||
if (r > 0)
|
||||
{
|
||||
tsf->size += r;
|
||||
pthread_mutex_lock(×hift_size_lock);
|
||||
timeshift_total_size += r;
|
||||
pthread_mutex_unlock(×hift_size_lock);
|
||||
}
|
||||
close(tsf->fd);
|
||||
tsf->fd = -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue