From 5b71d9f54e39495da417cb4bbfed57756a72ae35 Mon Sep 17 00:00:00 2001 From: Michal Pemcak Date: Sat, 29 Aug 2026 04:11:50 +0200 Subject: [PATCH] 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. --- src/qbt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qbt.js b/src/qbt.js index 6686a21..f985e06 100644 --- a/src/qbt.js +++ b/src/qbt.js @@ -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()]