lib/vagrant/action/builtin/box_add.rb in vagrant-unbundled-1.8.4.2 vs lib/vagrant/action/builtin/box_add.rb in vagrant-unbundled-1.8.5.1

- old
+ new

@@ -32,11 +32,11 @@ url = Array(env[:box_url]).map do |u| u = u.gsub("\\", "/") if Util::Platform.windows? && u =~ /^[a-z]:/i # On Windows, we need to be careful about drive letters - u = "file://#{URI.escape(u)}" + u = "file:///#{URI.escape(u)}" end if u =~ /^[a-z0-9]+:.*$/i && !u.start_with?("file://") # This is not a file URL... carry on next u @@ -470,9 +470,11 @@ # by trying to parse JSON! uri = URI.parse(d.source) if uri.scheme == "file" url = uri.path url ||= uri.opaque + #7570 Strip leading slash left in front of drive letter by uri.path + Util::Platform.windows? && url.gsub!(/^\/([a-zA-Z]:)/, '\1') begin File.open(url, "r") do |f| if f.size > METADATA_SIZE_LIMIT # Quit early, don't try to parse the JSON of gigabytes