From 37badab513ccac69db427207c1cd38ee57997449 Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 21 Nov 2014 16:35:18 +0100 Subject: 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 --- src/fr-command-tar.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/fr-command-tar.c') 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); + } } -- cgit v1.2.1