From 0f42a73b83f52452a091ba904c7361f27885022a Mon Sep 17 00:00:00 2001 From: titanism <101466223+titanism@users.noreply.github.com> Date: Mon, 23 Dec 2024 17:19:46 -0600 Subject: [PATCH] fix: fixed backups and archive.finalize invocation --- helpers/worker.js | 4 ++-- scripts/convert-sqlite-to-eml.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/worker.js b/helpers/worker.js index f5131c0bc3..00643a2d7c 100644 --- a/helpers/worker.js +++ b/helpers/worker.js @@ -716,6 +716,7 @@ async function backup(payload) { stream.end(); } + archive.finalize(); archive.on('warning', (err) => { logger.warn(err); }); @@ -723,7 +724,6 @@ async function backup(payload) { archive.once('error', reject); archive.once('end', resolve); }); - archive.finalize(); break; } @@ -786,6 +786,7 @@ async function backup(payload) { } } + archive.finalize(); archive.on('warning', (err) => { logger.warn(err); }); @@ -793,7 +794,6 @@ async function backup(payload) { archive.on('error', reject); archive.on('end', resolve); }); - archive.finalize(); break; } // No default diff --git a/scripts/convert-sqlite-to-eml.js b/scripts/convert-sqlite-to-eml.js index eb2f215ef5..85f5c8d2a5 100644 --- a/scripts/convert-sqlite-to-eml.js +++ b/scripts/convert-sqlite-to-eml.js @@ -192,6 +192,7 @@ const instance = { } } + archive.finalize(); archive.on('warning', (err) => { logger.warn(err); }); @@ -199,7 +200,6 @@ const instance = { archive.on('error', reject); archive.on('end', resolve); }); - archive.finalize(); console.log('tmp', tmp); })();