diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-09-25 10:31:05 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-09-25 10:31:05 +0000 |
commit | 76634cc63c9c9d8b456fdd9503a861c8854e0739 (patch) | |
tree | 8efb7c091819f2d5080e702a36607f2814645935 /draklive | |
parent | 38bb20f8b0af585e6b01d9a23eee1fb5361f3d30 (diff) | |
download | draklive-76634cc63c9c9d8b456fdd9503a861c8854e0739.tar draklive-76634cc63c9c9d8b456fdd9503a861c8854e0739.tar.gz draklive-76634cc63c9c9d8b456fdd9503a861c8854e0739.tar.bz2 draklive-76634cc63c9c9d8b456fdd9503a861c8854e0739.tar.xz draklive-76634cc63c9c9d8b456fdd9503a861c8854e0739.zip |
fix division by zero /o\
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -186,7 +186,7 @@ sub progress_start { sub progress_show { my ($progress, $time) = @_; my $elapsed_time = $time - $progress->{start_time}; - my $eta = int($elapsed_time*$progress->{total}/$progress->{current}); + my $eta = $progress->{current} ? int($elapsed_time*$progress->{total}/$progress->{current}) : -1; printf("\r%3d%% (%$progress->{maxl}s/%-$progress->{maxl}s), %8s/%8s (ETA)", int(100*$progress->{current}/$progress->{total}), (map { substr($_, 0, length($_)-$progress->{exp_divide}) } $progress->{current}, $progress->{total}), |