diff --git a/CHANGELOG.md b/CHANGELOG.md index d9083fe09..9f9e6df0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ BUG FIXES: - core: The version for `Vagrant.configure` can now be an int. [GH-2689] - core: `Vagrant.has_plugin?` tries to use plugin's gem name before registered plugin name [GH-2617] + - core: Fix exception if an EOFError was somehow raised by Ruby while + checking a box checksum. [GH-2716] ## 1.4.1 (December 18, 2013) diff --git a/lib/vagrant/util/file_checksum.rb b/lib/vagrant/util/file_checksum.rb index 28a21ccd0..d25b36b1d 100644 --- a/lib/vagrant/util/file_checksum.rb +++ b/lib/vagrant/util/file_checksum.rb @@ -28,8 +28,14 @@ class FileChecksum File.open(@path, "r") do |f| while !f.eof - buf = f.readpartial(BUFFER_SIZE) - digest.update(buf) + begin + buf = f.readpartial(BUFFER_SIZE) + digest.update(buf) + rescue EOFError + # Although we check for EOF earlier, this seems to happen + # sometimes anyways [GH-2716]. + break + end end end