Skip to content

Commit

Permalink
Let the UI to calculate the percentage
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Aug 25, 2016
1 parent 2aa193d commit 733bc7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/installation/update_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def fetch(path = Pathname("/download"))
init_progress

packages.each_with_object(update_files).with_index do |(package, files), index|
update_progress(100 * index / packages.size)
update_progress(index)
files << fetch_package(package, path)
end
rescue PackageNotFound, CouldNotExtractPackage, CouldNotSquashPackage => e
Expand Down Expand Up @@ -394,7 +394,7 @@ def init_progress
# TRANSLATORS: progress title
_("Downloading Packages..."),
# size
100,
packages.size,
# stages
[
# TRANSLATORS: progress label
Expand Down

0 comments on commit 733bc7d

Please sign in to comment.