[gnome-autoar] extractor: Add comment why password is requested for ZIP only



commit c68c6795f207ac07a288451f5895a0281165741b
Author: Ondrej Holy <oholy redhat com>
Date:   Mon Feb 7 14:21:08 2022 +0100

    extractor: Add comment why password is requested for ZIP only
    
    Add comment explaining why password is requested for ZIP only to make
    that obvious.
    
    https://gitlab.gnome.org/GNOME/gnome-autoar/-/merge_requests/34

 gnome-autoar/autoar-extractor.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gnome-autoar/autoar-extractor.c b/gnome-autoar/autoar-extractor.c
index 6064172..13a1ccc 100644
--- a/gnome-autoar/autoar-extractor.c
+++ b/gnome-autoar/autoar-extractor.c
@@ -1684,6 +1684,12 @@ autoar_extractor_step_scan_toplevel (AutoarExtractor *self)
       return;
     }
 
+    /* The password is requested only for the ZIP format to avoid showing
+     * password prompt for 7ZIP/RAR, where archive_entry_is_encrypted resp.
+     * archive_entry_is_metadata_encrypted returns TRUE, but followup
+     * archive_read_data_block resp. archive_read_next_header call leads to
+     * an error. See https://github.com/libarchive/libarchive/issues/1662.
+     */
     if (archive_entry_is_encrypted (entry) &&
         archive_format (a) == ARCHIVE_FORMAT_ZIP) {
       autoar_extractor_request_passphrase (self);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]