Skip to content

Commit

Permalink
fix: fixed backups and archive.finalize invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Dec 23, 2024
1 parent 159f228 commit 0f42a73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions helpers/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,14 +716,14 @@ async function backup(payload) {
stream.end();
}

archive.finalize();
archive.on('warning', (err) => {
logger.warn(err);
});
await new Promise((resolve, reject) => {
archive.once('error', reject);
archive.once('end', resolve);
});
archive.finalize();
break;
}

Expand Down Expand Up @@ -786,14 +786,14 @@ async function backup(payload) {
}
}

archive.finalize();
archive.on('warning', (err) => {
logger.warn(err);
});
await new Promise((resolve, reject) => {
archive.on('error', reject);
archive.on('end', resolve);
});
archive.finalize();
break;
}
// No default
Expand Down
2 changes: 1 addition & 1 deletion scripts/convert-sqlite-to-eml.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ const instance = {
}
}

archive.finalize();
archive.on('warning', (err) => {
logger.warn(err);
});
await new Promise((resolve, reject) => {
archive.on('error', reject);
archive.on('end', resolve);
});
archive.finalize();

console.log('tmp', tmp);
})();

0 comments on commit 0f42a73

Please sign in to comment.