From d5858b0b50e6073a2f520ecaf01338c93fb7aefb Mon Sep 17 00:00:00 2001 From: BtbN Date: Tue, 15 Jan 2013 23:53:55 +0100 Subject: [PATCH] Fix assertion in reaper thread --- src/timeshift/timeshift_filemgr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/timeshift/timeshift_filemgr.c b/src/timeshift/timeshift_filemgr.c index 9260e81c..4b90eb60 100644 --- a/src/timeshift/timeshift_filemgr.c +++ b/src/timeshift/timeshift_filemgr.c @@ -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; }