fix: TWO_HOURS constant in staging cleanup was actually 5 minutes

Cleanup deleted completed staging files as soon as 5 minutes had
passed instead of the intended 2 hours, so successfully downloaded
files could be silently removed before being moved out of staging.
This commit is contained in:
2026-08-29 04:11:50 +02:00
parent 4a756c4be3
commit 5b71d9f54e

View File

@@ -468,7 +468,7 @@ function register(app) {
let staged;
try { staged = fs.readdirSync(SAVE_PATH); } catch { return; }
const now = Date.now();
const TWO_HOURS = 5 * 60 * 1000;
const TWO_HOURS = 2 * 60 * 60 * 1000;
const activeFiles = new Set(
[...downloads.values()]