somehow, this works

This commit is contained in:
Essem 2022-07-20 00:59:56 -05:00
parent c4272d3c17
commit 00ab7308ff
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C

View file

@ -53,7 +53,7 @@ export async function removeOldImages(ipc, size) {
});
}).filter(Boolean);
const resolvedFiles = await Promise.all(files);
let newSize = resolvedFiles.reduce((a, b)=>{
let newSize = resolvedFiles.filter(Boolean).reduce((a, b) => {
return a + b.size;
}, 0);
const oldestFiles = resolvedFiles.sort((a, b) => a.ctime - b.ctime);