aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-10-13 08:11:33 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-10-13 08:11:33 +0000
commit4fca8dab0d1e9c1f4c116b36b4c5e15118c01105 (patch)
treea3781a55b7588f3dc4534d212bb94fedc2a45543
parent508e72a22d999072b104f122e0552d7856c9c7ae (diff)
downloadrpmdrake-4fca8dab0d1e9c1f4c116b36b4c5e15118c01105.tar
rpmdrake-4fca8dab0d1e9c1f4c116b36b4c5e15118c01105.tar.gz
rpmdrake-4fca8dab0d1e9c1f4c116b36b4c5e15118c01105.tar.bz2
rpmdrake-4fca8dab0d1e9c1f4c116b36b4c5e15118c01105.tar.xz
rpmdrake-4fca8dab0d1e9c1f4c116b36b4c5e15118c01105.zip
Protection against a division by zero
-rwxr-xr-xrpmdrake2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpmdrake b/rpmdrake
index 1f24d0e5..e6500395 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -1391,7 +1391,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
gurpm::label(N("Installing package `%s' (%s/%s)...", $pkg->name, ++$progress_nb, $total_nb));
}
} elsif ($subtype eq 'progress') {
- gurpm::progress($amount/$total);
+ gurpm::progress($total ? $amount/$total : 1);
}
};
my $fh;