Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

add error logging for size mismatch

Abhinav41768173e230
diff --git a/src/services/diskCache.ts b/src/services/diskCache.ts
index a9e07a5b79..3c02af9e9f 100644
--- a/src/services/diskCache.ts
+++ b/src/services/diskCache.ts
@@ -32,6 +32,10 @@ export class DiskCache implements LimitedCache {
if (existsSync(cachePath)) {
const fileStats = await stat(cachePath);
if (sizeInBytes && fileStats.size !== sizeInBytes) {
+ logError(
+ Error(),
+ 'Cache key exists but size does not match. Deleting cache key.'
+ );
unlink(cachePath);
return undefined;
}