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:
@@ -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()]
|
||||
|
||||
Reference in New Issue
Block a user