Merge pull request #1432 from martoe/GH-1424

Adding a box fails on Windows, fix by copying files [GH-1424]
This commit is contained in:
Mitchell Hashimoto 2013-03-16 10:12:23 -07:00
commit 46fd6939ad
1 changed files with 4 additions and 6 deletions

View File

@ -147,12 +147,10 @@ module Vagrant
end
# Move to final destination
FileUtils.mv(temp_dir.to_s, final_dir.to_s)
# Recreate the directory. This avoids a bug in Ruby where `mktmpdir`
# cleanup doesn't check if the directory is already gone. Ruby bug
# #6715: http://bugs.ruby-lang.org/issues/6715
Dir.mkdir(temp_dir, 0700)
final_dir.mkpath
temp_dir.children(true).each do |f|
FileUtils.mv(f, final_dir.join(f.basename))
end
end
# Return the box