Ignore possible version directories that are hidden folders, i.e. dot folders.

This commit is contained in:
Philip Wrenn 2014-10-31 13:20:23 -04:00 committed by Seth Vargo
parent 9b4a498f82
commit 4c8fe42d70
1 changed files with 2 additions and 2 deletions

View File

@ -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