소스 검색

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

Part of #22424.
teor 8 년 전
부모
커밋
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 {