summaryrefslogtreecommitdiff
path: root/src/fr-command-tar.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-21 16:35:18 +0100
committerinfirit <[email protected]>2014-11-22 20:25:30 +0100
commit37badab513ccac69db427207c1cd38ee57997449 (patch)
tree7cffd3a0579d28eb631923a2c561119a2084fc00 /src/fr-command-tar.c
parent012914111652a7ee64abe08f457cd9eb77bc5f35 (diff)
downloadengrampa-37badab513ccac69db427207c1cd38ee57997449.tar.bz2
engrampa-37badab513ccac69db427207c1cd38ee57997449.tar.xz
progress dialog: show the number of remaining files to complete the operation
instead of the name of the file added/removed/extracted. Based on FR commit: bf2b5d2352cfcd9d4345dda7976208672838dce1 From: Paolo Bacchilega <[email protected]>
Diffstat (limited to 'src/fr-command-tar.c')
-rw-r--r--src/fr-command-tar.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fr-command-tar.c b/src/fr-command-tar.c
index 7b7ef02..62818a9 100644
--- a/src/fr-command-tar.c
+++ b/src/fr-command-tar.c
@@ -283,7 +283,6 @@ process_line__generic (char *line,
char *action_msg)
{
FrCommand *comm = FR_COMMAND (data);
- char *msg;
if (line == NULL)
return;
@@ -291,14 +290,15 @@ process_line__generic (char *line,
if (line[strlen (line) - 1] == '/') /* ignore directories */
return;
- msg = g_strconcat (action_msg, file_name_from_path (line), NULL);
- fr_command_message (comm, msg);
- g_free (msg);
-
if (comm->n_files != 0) {
double fraction = (double) ++comm->n_file / (comm->n_files + 1);
fr_command_progress (comm, fraction);
}
+ else {
+ char *msg = g_strconcat (action_msg, file_name_from_path (line), NULL);
+ fr_command_message (comm, msg);
+ g_free (msg);
+ }
}