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:
Adam Sutton 2013-01-15 15:00:05 -08:00
commit 2da44d4810

View file

@ -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(&timeshift_size_lock);
timeshift_total_size += r;
pthread_mutex_unlock(&timeshift_size_lock);
}
close(tsf->fd);
tsf->fd = -1;
}