When initially downloading a package, pacman will display a message
like:
        wine-6.6-1-x86_64.pkg.tar.zst downloading...

Then when the download progresses the message will change to:
        wine-6.6-1-x86_64.pkg.tar.zst

So instead lets match the progress message so there's no sudden change.
---
 src/pacman/callback.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 00360e2c..c683dcd5 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -876,9 +876,9 @@ static void draw_pacman_progress_bar(struct 
pacman_progress_bar *bar)
 static void dload_init_event(const char *filename, alpm_download_event_init_t 
*data)
 {
        (void)data;
+       char *cleaned_filename = clean_filename(filename);
 
        if(!dload_progressbar_enabled()) {
-               char *cleaned_filename = clean_filename(filename);
                printf(_(" %s downloading...\n"), cleaned_filename);
                free(cleaned_filename);
                return;
@@ -892,7 +892,7 @@ static void dload_init_event(const char *filename, 
alpm_download_event_init_t *d
        multibar_ui.active_downloads = 
alpm_list_add(multibar_ui.active_downloads, bar);
 
        console_cursor_move_end();
-       printf(_(" %s downloading...\n"), filename);
+       printf(" %s\n", cleaned_filename);
        multibar_ui.cursor_lineno++;
        multibar_ui.active_downloads_num++;
 
-- 
2.31.1

Reply via email to