From 0b28910b776c22c17657a1af343b093711cc260e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 9 Mar 2012 10:18:40 -0800 Subject: [PATCH] Update CHANGELOG + Style --- CHANGELOG.md | 2 ++ lib/vagrant/ui.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d247221a8..a0e42faf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ not working properly. [GH-778] - `VAGRANT_CWD` environmental variable can be used to set the CWD to something other than the current directory. + - Downloading boxes from servers that don't send a content-length + now works properly. [GH-788] ## 1.0.0 (March 6, 2012) diff --git a/lib/vagrant/ui.rb b/lib/vagrant/ui.rb index 3fd6e3a01..623a8ba31 100644 --- a/lib/vagrant/ui.rb +++ b/lib/vagrant/ui.rb @@ -78,7 +78,7 @@ module Vagrant # to the UI. Send `clear_line` to clear the line to show # a continuous progress meter. def report_progress(progress, total, show_parts=true) - if total and not total == 0 + if total && total > 0 percent = (progress.to_f / total.to_f) * 100 line = "Progress: #{percent.to_i}%" line << " (#{progress} / #{total})" if show_parts