Fix divide by zero when downloading zero length files
If someone did a 'touch bogusrepo.db', we had the potential to throw a
SIGFPE or divide by zero, given that the total file size was 0 and
getting passed up to the pacman callback. Fix this so we get weird but
sane output and don't blow up when downloading:
:: Synchronizing package databases...
core 35.7K 306.7K/s 00:00:00 [###################] 100%
bogusrepo 0.0K 0.0K/s 00:00:00 [###################] 100%
Exception as seen in gdb:
Program received signal SIGFPE, Arithmetic exception.
0x000000000040cc73 in cb_dl_progress (filename=0x619dfc "bogusrepo.db", file_xfered=0, file_total=0) at callback.c:584
584 file_percent = (file_xfered * 100) / file_total;
Signed-off-by: Dan McGee <dan@archlinux.org>
0 files changed, 0 insertions, 0 deletions