diff --git a/src/timeshift/timeshift_filemgr.c b/src/timeshift/timeshift_filemgr.c index a0d1603a..19bc6b43 100644 --- a/src/timeshift/timeshift_filemgr.c +++ b/src/timeshift/timeshift_filemgr.c @@ -75,7 +75,6 @@ static void* timeshift_reaper_callback ( void *p ) if (errno != ENOTEMPTY) tvhlog(LOG_ERR, "timeshift", "failed to remove %s [e=%s]", dpath, strerror(errno)); - atomic_add_u64(×hift_total_size, -tsf->size); /* Free memory */ while ((ti = TAILQ_FIRST(&tsf->iframes))) { @@ -163,6 +162,7 @@ void timeshift_filemgr_remove if (tsf->fd != -1) close(tsf->fd); TAILQ_REMOVE(&ts->files, tsf, link); + atomic_add_u64(×hift_total_size, -tsf->size); timeshift_reaper_remove(tsf); }