Adding a box fails on Windows [GH-1424]
The Dir.mkdir statement fails on Windows if src and dest reside on different partitions. Files are therefore copied one-by-one. The #6715 workaround is not needed anymore.
This commit is contained in:
parent
9a29cecfdf
commit
24aaa7f282
|
@ -147,12 +147,10 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
# Move to final destination
|
# Move to final destination
|
||||||
FileUtils.mv(temp_dir.to_s, final_dir.to_s)
|
final_dir.mkpath
|
||||||
|
temp_dir.children(true).each do |f|
|
||||||
# Recreate the directory. This avoids a bug in Ruby where `mktmpdir`
|
FileUtils.mv(f, final_dir.join(f.basename))
|
||||||
# cleanup doesn't check if the directory is already gone. Ruby bug
|
end
|
||||||
# #6715: http://bugs.ruby-lang.org/issues/6715
|
|
||||||
Dir.mkdir(temp_dir, 0700)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Return the box
|
# Return the box
|
||||||
|
|
Loading…
Reference in New Issue