diff --git a/debug/clean.mjs b/debug/clean.mjs index bbe08b2..f6519c7 100644 --- a/debug/clean.mjs +++ b/debug/clean.mjs @@ -11,7 +11,7 @@ const count = { }; const rows = await sql('items').select('id', 'dest'); -const ids = rows.map(r => r.id.toString() + ".png"); +const ids = rows.map(r => r.id.toString() + ".webp"); const dests = rows.map(r => r.dest); const files = { b: (await fs.readdir(opts.b)).filter(f => f !== '.empty'), @@ -30,4 +30,4 @@ count.t = (await Promise.all(unused.t.map(f => fs.rm(`${opts.t}/${f}`)))).length const tmp = (await fs.readdir(opts.tmp)).filter(f => f !== '.empty'); count.tmp = (await Promise.all(tmp.map(f => fs.rm(`${opts.tmp}/${f}`)))).length; -console.log(count); +console.log(count, unused);