From b0e6085c0be93b09b91fd541c5fe0cd45522c4dd Mon Sep 17 00:00:00 2001 From: David Calavera Date: Sat, 31 Mar 2012 18:50:45 -0700 Subject: [PATCH] Fix importing progress status check --- lib/vagrant/driver/virtualbox_4_0.rb | 1 + lib/vagrant/driver/virtualbox_4_1.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/vagrant/driver/virtualbox_4_0.rb b/lib/vagrant/driver/virtualbox_4_0.rb index 3a62bea8d..d68d323e8 100644 --- a/lib/vagrant/driver/virtualbox_4_0.rb +++ b/lib/vagrant/driver/virtualbox_4_0.rb @@ -173,6 +173,7 @@ module Vagrant # The progress of the import will be in the last line. Do a greedy # regular expression to find what we're looking for. if current = lines.last[/.+(\d{2})%/, 1] + current = current.to_i if current > last last = current yield current if block_given? diff --git a/lib/vagrant/driver/virtualbox_4_1.rb b/lib/vagrant/driver/virtualbox_4_1.rb index eb43419ce..f471aa89f 100644 --- a/lib/vagrant/driver/virtualbox_4_1.rb +++ b/lib/vagrant/driver/virtualbox_4_1.rb @@ -173,6 +173,7 @@ module Vagrant # The progress of the import will be in the last line. Do a greedy # regular expression to find what we're looking for. if current = lines.last[/.+(\d{2})%/, 1] + current = current.to_i if current > last last = current yield current if block_given?