diff --git a/lib/vagrant/util/platform.rb b/lib/vagrant/util/platform.rb index 9931c40f1..e051573c3 100644 --- a/lib/vagrant/util/platform.rb +++ b/lib/vagrant/util/platform.rb @@ -392,8 +392,8 @@ module Vagrant # @param [String, Pathname] path Path to convert # @return [String] def wsl_to_windows_path(path) - path = File.expand_path(path.to_s) if wsl? && wsl_windows_access? && !path.match(/^[a-zA-Z]:/) + path = File.expand_path(path.to_s) if wsl_path?(path) parts = path.split("/") parts.delete_if(&:empty?)