summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2022-01-17 15:50:08 +0100
committerAntónio Fernandes <antoniof@gnome.org>2022-02-11 19:24:09 +0000
commit7d5b4b6f3976d20c5684316cd0d7a3e6fef9da87 (patch)
tree36ea904d6b3f369f20bf19236372a8b8044b3f8a /src
parent04b2a16da707e84af09ea6e1fc927f692fb47b4f (diff)
downloadnautilus-7d5b4b6f3976d20c5684316cd0d7a3e6fef9da87.tar.gz
file-operations: Call autoar_compressor_set_passphrase conditionally
The `autoar_compressor_set_passphrase` function is always called currently regardless the fact whether password is set, or not. Consequently, the "autoar_compressor_set_passphrase: assertion 'self->format == AUTOAR_FORMAT_ZIP' failed" critical is printed. Let's call that function only if the passphrase is really wanted.
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-file-operations.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 54613e086..d358518b2 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -9037,7 +9037,10 @@ compress_task_thread_func (GTask *task,
compress_job->format,
compress_job->filter,
FALSE);
- autoar_compressor_set_passphrase (compressor, compress_job->passphrase);
+ if (compress_job->passphrase && compress_job->passphrase[0] != '\0')
+ {
+ autoar_compressor_set_passphrase (compressor, compress_job->passphrase);
+ }
autoar_compressor_set_output_is_dest (compressor, TRUE);