Expand Cygwin path to Windows for VirtualBox shared folders

This commit is contained in:
Mitchell Hashimoto 2013-04-06 22:08:41 -07:00
parent 373a1d8633
commit c34c8b39c3
2 changed files with 7 additions and 2 deletions

View File

@ -53,7 +53,8 @@ BUG FIXES:
- Cygwin will always output color by default. Specify `--no-color` to - Cygwin will always output color by default. Specify `--no-color` to
override this. override this.
- Assume Cygwin has a TTY for asking for input. [GH-1430] - Assume Cygwin has a TTY for asking for input. [GH-1430]
- Expand Cygwin paths to Windows paths for calls to VBoxManage. - Expand Cygwin paths to Windows paths for calls to VBoxManage and
for VirtualBox shared folders.
## 1.1.6 (April 3, 2013) ## 1.1.6 (April 3, 2013)

View File

@ -2,6 +2,7 @@ require "pathname"
require "log4r" require "log4r"
require "vagrant/util/platform"
require "vagrant/util/scoped_hash_override" require "vagrant/util/scoped_hash_override"
module VagrantPlugins module VagrantPlugins
@ -70,9 +71,12 @@ module VagrantPlugins
folders = [] folders = []
shared_folders.each do |id, data| shared_folders.each do |id, data|
hostpath = File.expand_path(data[:hostpath], @env[:root_path])
hostpath = Vagrant::Util::Platform.cygwin_windows_path(hostpath)
folders << { folders << {
:name => id, :name => id,
:hostpath => File.expand_path(data[:hostpath], @env[:root_path]), :hostpath => hostpath,
:transient => data[:transient] :transient => data[:transient]
} }
end end