From 89161ee6e889a718eb07e0b48e2563419ded816b Mon Sep 17 00:00:00 2001 From: Michael Kuzmin Date: Thu, 15 May 2014 23:19:15 +0400 Subject: [PATCH] synced_folders/rsync: fixed path style for MSYS version of rsync on Windows --- plugins/synced_folders/rsync/helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/synced_folders/rsync/helper.rb b/plugins/synced_folders/rsync/helper.rb index 28bddc8138b..baef6de724b 100644 --- a/plugins/synced_folders/rsync/helper.rb +++ b/plugins/synced_folders/rsync/helper.rb @@ -39,8 +39,12 @@ def self.rsync_single(machine, ssh_info, opts) hostpath = Vagrant::Util::Platform.fs_real_path(hostpath).to_s if Vagrant::Util::Platform.windows? - # rsync for Windows expects cygwin style paths, always. + # Cygwin's rsync expects cygwin style paths in form of '/cygdrive/c/path/to/file' hostpath = Vagrant::Util::Platform.cygwin_path(hostpath) + if !Vagrant::Util::Platform.cygwin? + # MSYS' rsync expects paths in form of '/c/path/to/file' + hostpath = hostpath.sub(%r{^/cygdrive}, '') + end end # Make sure the host path ends with a "/" to avoid creating