Skip to content

Commit

Permalink
Set default compression level
Browse files Browse the repository at this point in the history
  • Loading branch information
JackGruber committed Jul 19, 2021
1 parent c4b0097 commit 54eefb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 54eefb4

Please sign in to comment.