summaryrefslogtreecommitdiff
path: root/src/fr-command-7z.c
diff options
context:
space:
mode:
authorjishengjie <[email protected]>2022-12-14 15:38:30 +0800
committermouse <[email protected]>2023-03-21 17:34:55 +0800
commitc279d858e62bb7d6dbca8e3686e22a5bf88c79f8 (patch)
tree63fc78a7c699373ab15d56ce32f2290707cd74e7 /src/fr-command-7z.c
parentc16b9005558acb5d6cfa23259604c26f8919d8bd (diff)
downloadengrampa-c279d858e62bb7d6dbca8e3686e22a5bf88c79f8.tar.bz2
engrampa-c279d858e62bb7d6dbca8e3686e22a5bf88c79f8.tar.xz
fix: Encrypted documents in. 7z format cannot delete locked files and folders
Diffstat (limited to 'src/fr-command-7z.c')
-rw-r--r--src/fr-command-7z.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c
index c3c66ab..4c5b03a 100644
--- a/src/fr-command-7z.c
+++ b/src/fr-command-7z.c
@@ -394,12 +394,29 @@ fr_command_7z_add (FrCommand *comm,
}
static void
+process_line__delete (char *line,
+ gpointer data)
+{
+ FrCommand *comm = FR_COMMAND (data);
+
+ if ((strstr (line, "Wrong password?") != NULL)
+ || (strstr (line, "Enter password") != NULL))
+ {
+ password_required = TRUE;
+ }
+}
+
+static void
fr_command_7z_delete (FrCommand *comm,
const char *from_file,
GList *file_list)
{
GList *scan;
+ fr_process_set_out_line_func (comm->process,
+ process_line__delete,
+ comm);
+
fr_command_7z_begin_command (comm);
fr_process_add_arg (comm->process, "d");
if (spd_support) fr_process_add_arg (comm->process, "-spd");