core: BoxAdd uses the proper path on Unix

This commit is contained in:
Mitchell Hashimoto 2014-01-23 17:02:29 -08:00
parent 05eeefbe36
commit 0fceed6ff4
1 changed files with 4 additions and 1 deletions

View File

@ -310,8 +310,11 @@ module Vagrant
# by trying to parse JSON! # by trying to parse JSON!
uri = URI.parse(d.source) uri = URI.parse(d.source)
if uri.scheme == "file" if uri.scheme == "file"
url = uri.path
url = uri.opaque if Util::Platform.windows?
begin begin
File.open(uri.opaque, "r") do |f| File.open(url, "r") do |f|
BoxMetadata.new(f) BoxMetadata.new(f)
end end
return true return true