From 4c8fe42d70c31312ec3d954df58af8b1a59e6b02 Mon Sep 17 00:00:00 2001 From: Philip Wrenn Date: Fri, 31 Oct 2014 13:20:23 -0400 Subject: [PATCH] Ignore possible version directories that are hidden folders, i.e. dot folders. --- lib/vagrant/box_collection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/box_collection.rb b/lib/vagrant/box_collection.rb index 925f62a87..74c34e84a 100644 --- a/lib/vagrant/box_collection.rb +++ b/lib/vagrant/box_collection.rb @@ -224,7 +224,7 @@ module Vagrant # Otherwise, traverse the subdirectories and see what versions # we have. child.children(true).each do |versiondir| - next if !versiondir.directory? + next if !versiondir.directory? || versiondir.basename.to_s[0] == '.' version = versiondir.basename.to_s @@ -269,7 +269,7 @@ module Vagrant end versions = box_directory.children(true).map do |versiondir| - next if !versiondir.directory? + next if !versiondir.directory? || versiondir.basename.to_s[0] == '.' version = versiondir.basename.to_s Gem::Version.new(version) end.compact