[gnome-autoar/wip/oholy/various-fixes: 18/23] extractor: Reduce the number of files and size when skipping
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-autoar/wip/oholy/various-fixes: 18/23] extractor: Reduce the number of files and size when skipping
- Date: Fri, 12 Mar 2021 15:42:21 +0000 (UTC)
commit 7f2e1868df66342abd1bb9f456df2b8d5668ef2f
Author: Ondrej Holy <oholy redhat com>
Date: Wed Feb 24 16:43:29 2021 +0100
extractor: Reduce the number of files and size when skipping
In case of conflict, when skipping some file, the `total_size` and `total_files`
is not updated, but neither `completed_files` and `completed_size`. Let's
reduce the `total_size` and `total_files`. Same approach is used in Nautilus
when skipping.
gnome-autoar/autoar-extractor.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gnome-autoar/autoar-extractor.c b/gnome-autoar/autoar-extractor.c
index 9e14379..9ff7c09 100644
--- a/gnome-autoar/autoar-extractor.c
+++ b/gnome-autoar/autoar-extractor.c
@@ -1974,6 +1974,8 @@ autoar_extractor_step_extract (AutoarExtractor *self) {
}
if (file_conflict && action == AUTOAR_CONFLICT_SKIP) {
+ self->total_files -= 1;
+ self->total_size -= archive_entry_size (entry);
continue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]