Replace '\' with '/' on synced folders on Windows
This commit is contained in:
parent
c0404e3f63
commit
fc7c8b1e99
|
@ -63,6 +63,8 @@ BUG FIXES:
|
|||
- With forward agent enabled and sudo being used, Vagrant will automatically
|
||||
discover and set `SSH_AUTH_SOCK` remotely so that forward agent
|
||||
works properly despite misconfigured sudoers. [GH-1307]
|
||||
- Synced folder paths on Windows containing '\' are replaced with
|
||||
'/' internally so that they work properly.
|
||||
|
||||
## 1.2.4 (July 16, 2013)
|
||||
|
||||
|
|
|
@ -125,6 +125,12 @@ module VagrantPlugins
|
|||
# folder.
|
||||
# @param [Hash] options Additional options.
|
||||
def synced_folder(hostpath, guestpath, options=nil)
|
||||
if Vagrant::Util::Platform.windows?
|
||||
# On Windows, Ruby just uses normal '/' for path seps, so
|
||||
# just replace normal Windows style seps with Unix ones.
|
||||
hostpath.gsub!("\\", "/")
|
||||
end
|
||||
|
||||
options ||= {}
|
||||
options[:guestpath] = guestpath.to_s.gsub(/\/$/, '')
|
||||
options[:hostpath] = hostpath
|
||||
|
|
Loading…
Reference in New Issue