Преглед изворни кода

Don't underflow usage when it is unknown and a file is removed

Part of #22424.
teor пре 7 година
родитељ
комит
334fe6bb6b
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/common/storagedir.c

+ 1 - 1
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 {