core: Cygwin path conversion must replace slashes first

This commit is contained in:
Mitchell Hashimoto 2014-03-07 22:56:47 -08:00
parent 914d177346
commit c6b07e10c9
1 changed files with 4 additions and 0 deletions

View File

@ -57,6 +57,10 @@ module Vagrant
def cygwin_windows_path(path, **opts)
return path if !cygwin? && !opts[:force]
# First, no matter what process we use below, we must replace
# all "\" with "/", otherwise cygpath doesn't work.
path = path.gsub("\\", "/")
begin
# First try the real cygpath
process = Subprocess.execute("cygpath", "-w", "-l", "-a", path.to_s)