[tor/master] Don't underflow usage when it is unknown and a file is removed

30 May
2017
30 May
'17
12:51 p.m.
commit 334fe6bb6b124c2f3eb1186610999446d57cde76 Author: teor <teor2345@gmail.com> Date: Sun May 28 22:16:00 2017 +1000 Don't underflow usage when it is unknown and a file is removed Part of #22424. --- src/common/storagedir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/storagedir.c b/src/common/storagedir.c index 9140ed2..532fa2a 100644 --- a/src/common/storagedir.c +++ b/src/common/storagedir.c @@ -425,7 +425,7 @@ storage_dir_remove_file(storage_dir_t *d, } } if (unlink(ipath) == 0) { - if (! BUG(d->usage < size)) { + if (d->usage_known && ! BUG(d->usage < size)) { d->usage -= size; } } else {
2926
Age (days ago)
2926
Last active (days ago)
0 comments
1 participants
participants (1)
-
nickm@torproject.org