[nautilus/wip/oholy/compress-dialog-dropdown: 4/5] file-operations: Call autoar_compressor_set_passphrase conditionally
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/oholy/compress-dialog-dropdown: 4/5] file-operations: Call autoar_compressor_set_passphrase conditionally
- Date: Wed, 9 Feb 2022 16:15:18 +0000 (UTC)
commit ce6dcacd62950266204ecc58f2f7b7b3d5777b46
Author: Ondrej Holy <oholy redhat com>
Date: Mon Jan 17 15:50:08 2022 +0100
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.
src/nautilus-file-operations.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 38be3fe3a..f07d5ef10 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -9030,7 +9030,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]