mitchellh/vagrant — pull request #1155 by sl4m (2012-09-26 02:20:03+00:00)
Title: Fixes an exception issue when a non-directory appears in the boxes dir

I was perusing in my `boxes_dir` today and my awesome Macbook decides to leave a `.DS_Store` file in the directory (as it does everywhere else). When running `vagrant box list`, an exception occurred in the following form:

```
[skim@master][~/lolcat/me/vm] vagrant box list
You're using a development version of Vagrant. This version
makes structural changes to the `~/.vagrant.d` folder such that
you will be _unable_ to downgrade back to a 1.0.x release. This
affects all Vagrant environments on your computer. Other users
of Vagrantfiles you create and use can continue to use 1.0.x without
issue so long as it is on a computer that has never run this
development version.

This message will be removed when this version is officially released.
If you're sure you'd like to continue, type 'Y' and then enter: y
/Users/skim/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/pathname.rb:397:in `open': Not a directory - /Users/skim/.vagrant.d/boxes/.DS_Store (Errno::ENOTDIR)
from /Users/skim/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/pathname.rb:397:in `foreach'
from /Users/skim/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/pathname.rb:397:in `children'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bundler/gems/vagrant-184f6dccb2d5/lib/vagrant/box_collection.rb:149:in `block in all'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bundler/gems/vagrant-184f6dccb2d5/lib/vagrant/box_collection.rb:136:in `each'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bundler/gems/vagrant-184f6dccb2d5/lib/vagrant/box_collection.rb:136:in `all'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bundler/gems/vagrant-184f6dccb2d5/plugins/commands/box/command/list.rb:18:in `execute'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bundler/gems/vagrant-184f6dccb2d5/plugins/commands/box/command/root.rb:47:in `execute'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bundler/gems/vagrant-184f6dccb2d5/lib/vagrant/cli.rb:51:in `execute'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bundler/gems/vagrant-184f6dccb2d5/lib/vagrant/environment.rb:182:in `cli'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bundler/gems/vagrant-184f6dccb2d5/bin/vagrant:71:in `'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bin/vagrant:19:in `load'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bin/vagrant:19:in `

'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/skim/.rvm/gems/ruby-1.9.3-p194@vm/bin/ruby_noexec_wrapper:14:in `

'
```

I have fixed the issue in this PR.