summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/storagedir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/storagedir.c b/src/common/storagedir.c
index 9140ed29bd..532fa2a2c8 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 {