plugins/providers/virtualbox/action/export.rb in vagrant-unbundled-2.0.2.0 vs plugins/providers/virtualbox/action/export.rb in vagrant-unbundled-2.0.3.0

- old
+ new

@@ -1,6 +1,7 @@ require "fileutils" +require 'vagrant/util/platform' module VagrantPlugins module ProviderVirtualBox module Action class Export @@ -30,10 +31,18 @@ # alone on the line. @env[:ui].clear_line end def ovf_path - File.join(@env["export.temp_dir"], "box.ovf") + path = File.join(@env["export.temp_dir"], "box.ovf") + + # If we're within WSL, we should use the correct path rather than + # the mnt path. GH-9059 + if Vagrant::Util::Platform.wsl? + path = Vagrant::Util::Platform.wsl_to_windows_path(path) + end + + return path end end end end end