Don't run on error

This commit is contained in:
awsr
2025-11-29 01:09:43 -08:00
parent eb4f4c683c
commit c3986172d5
+1 -1
View File
@@ -629,7 +629,7 @@ async function thumbCacheCleanup(folder, imgCount) {
const t0 = performance.now();
const staticGalleryHashes = new Set(galleryHashes);
const cachedHashesCount = await idbCount(folder)
.catch(() => 0);
.catch(() => Infinity); // Forces next check to fail if something went wrong
if (cachedHashesCount < staticGalleryHashes.size + 500) {
// Don't run when there aren't many excess entries
return;