forked from cromer/pamac-classic
fix #11
This commit is contained in:
parent
5f1c96e479
commit
f9fc090707
@ -897,13 +897,13 @@ namespace Pamac {
|
|||||||
}
|
}
|
||||||
if (total_download > 0) {
|
if (total_download > 0) {
|
||||||
fraction = (float) (xfered + already_downloaded) / total_download;
|
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));
|
textbar = "%s/%s".printf (format_size (xfered + already_downloaded), format_size (total_download));
|
||||||
else
|
else
|
||||||
textbar = "%s".printf (format_size (xfered + already_downloaded));
|
textbar = "%s".printf (format_size (xfered + already_downloaded));
|
||||||
} else {
|
} else {
|
||||||
fraction = (float) xfered / total;
|
fraction = (float) xfered / total;
|
||||||
if (fraction > 0)
|
if (fraction <= 1)
|
||||||
textbar = "%s/%s".printf (format_size (xfered), format_size (total));
|
textbar = "%s/%s".printf (format_size (xfered), format_size (total));
|
||||||
else
|
else
|
||||||
textbar = "%s".printf (format_size (xfered));
|
textbar = "%s".printf (format_size (xfered));
|
||||||
|
Loading…
Reference in New Issue
Block a user