From 54eefb41d27607c2873391b8edc0a7699d16554e Mon Sep 17 00:00:00 2001 From: JackGruber <24863925+JackGruber@users.noreply.github.com> Date: Mon, 19 Jul 2021 21:48:01 +0200 Subject: [PATCH] Set default compression level --- src/Backup.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Backup.ts b/src/Backup.ts index 3cff4a7..f705c52 100644 --- a/src/Backup.ts +++ b/src/Backup.ts @@ -465,7 +465,11 @@ class Backup { zipOptions = { ...zipOptions, ...options }; } zipOptions.method = []; - zipOptions.method.push("x" + this.compressionLevel); + if (this.compressionLevel) { + zipOptions.method.push("x" + this.compressionLevel); + } else { + zipOptions.method.push("x0"); + } const status = await sevenZip.add(zipFile, addFile, password, zipOptions); if (status !== true) {