From f9fc09070724c41e610941bb7dd89e20a911e836 Mon Sep 17 00:00:00 2001 From: guinux Date: Sat, 3 Jan 2015 19:41:58 +0100 Subject: [PATCH] fix #11 --- src/transaction.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transaction.vala b/src/transaction.vala index 0080400..e790166 100644 --- a/src/transaction.vala +++ b/src/transaction.vala @@ -897,13 +897,13 @@ namespace Pamac { } if (total_download > 0) { fraction = (float) (xfered + already_downloaded) / total_download; - if (fraction > 0) + if (fraction <= 1) textbar = "%s/%s".printf (format_size (xfered + already_downloaded), format_size (total_download)); else textbar = "%s".printf (format_size (xfered + already_downloaded)); } else { fraction = (float) xfered / total; - if (fraction > 0) + if (fraction <= 1) textbar = "%s/%s".printf (format_size (xfered), format_size (total)); else textbar = "%s".printf (format_size (xfered));