[gnome-autoar/wip/oholy/various-fixes: 5/17] extractor: Do not allow prefix modifications when output-is-dest
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-autoar/wip/oholy/various-fixes: 5/17] extractor: Do not allow prefix modifications when output-is-dest
- Date: Mon, 8 Mar 2021 08:52:59 +0000 (UTC)
commit 6170cfb0b1182ff617c222b603282f2252474f8c
Author: Ondrej Holy <oholy redhat com>
Date: Tue Feb 23 13:00:27 2021 +0100
extractor: Do not allow prefix modifications when output-is-dest
If the `output-is-dest` property is `TRUE`, the `prefix` is not cleared and is
passed to `decide-destination` signal. This looks unexpected because it allows
to change even the prefix which doesn't match archive name, which is not allowed
even if `output-is-dest` is `FALSE`. I am conviced that it should not be allowed
to change the `prefix` at all in this case. Let's clear the `prefix` variable to
avoid that.
gnome-autoar/autoar-extractor.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/gnome-autoar/autoar-extractor.c b/gnome-autoar/autoar-extractor.c
index d0a2d9a..9be7c0c 100644
--- a/gnome-autoar/autoar-extractor.c
+++ b/gnome-autoar/autoar-extractor.c
@@ -1844,6 +1844,7 @@ autoar_extractor_step_set_destination (AutoarExtractor *self)
if (self->output_is_dest) {
self->destination_dir = g_object_ref (self->output_file);
+ g_clear_object (&self->prefix);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]