Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsync wrong folder on windows #4837

Closed
tina-junold opened this issue Nov 17, 2014 · 3 comments
Closed

rsync wrong folder on windows #4837

tina-junold opened this issue Nov 17, 2014 · 3 comments

Comments

@tina-junold
Copy link

Hello,

EDIT:
After some time with this bug, playing around, it seems to me like a very strage bug.
Without running vagrant with debug it seems, that vagrant rsync is hanging... but it isn't...
(maybe same problem like #4819) , its syncing the wrong folder... its always using a parent folder (maybe base folder? ... i checked out project on

/cygdrive/c/Users/Someone/Projects/myproject

and while vagran, which shows me gets the correct path!!! in rsync call, the directory

/cygdrive/c/Users/Someone

is synced to the vm. Same on

/cygdrive/d/Projects/myproject

ended up in syncing

/cygdrive/d/

I tested this with msys (git), mingw64, cygwin64 and cwrsync...

I've currently the issue, if the path given the rsync as source directory has an whitespace in it the path will be synced wrong:

rsync --verbose --archive --delete -z --chmod=Du=rwx,Dgo=rwx,Fu=rwx,Fgo=rwx --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2200 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i 'C:/Users/Some User/.vagrant.d/insecure_private_key' --exclude .vagrant/ --exclude composer.lock --exclude vendor --exclude .* /cygdrive/c/Users/Some User/Projects/myproject/public/symfony-box.local/ [email protected]:/var/www
@tina-junold tina-junold changed the title rsync: sync wrong folder on windows with whitespaces in path rsync: sync wrong folder on windows Nov 20, 2014
@osroot25
Copy link

osroot25 commented Dec 7, 2014

Could one of these code-locations be responsible for the error?:

  • lib/vagrant/util/platform . fs_real_path, i.e. line 127, where the folder-name is encoded to "filesystem"? If the, in your case, last two folder-names cause some mixup and the two strings are not identical, rsync doesn't get them in the hostpath.
  • lib/vagrant/util/platform . cygwin_path , i.e. if cygpath fails, the "bash trick" could case the error? Does cygpath work on your system?

@sethvargo sethvargo changed the title rsync: sync wrong folder on windows rsync wrong folder on windows Jan 6, 2015
@cazzerson
Copy link
Contributor

There seem to be several tickets (#5570, #6024, #6297, #4514) related to this issue. I'm having trouble creating a Vagrant machine on a network share in Windows (due mainly, I believe, to a failure to escape/covert path separators). As a start, should the bash fallback in cygwin_path() be applied to cygwin_windows_path()?

https://github.com/mitchellh/vagrant/blob/d7eaf503298014a93e1faa8da88947bc7d32ba58/lib/vagrant/util/platform.rb#L59-L92

In my case, I'm using Git Shell (PowerShell), not cygwin, on a Windows host so cygwin_windows_path() just returns the original path. bash is available, though.

@mitchellh
Copy link
Contributor

I can't reproduce this anymore and I"ve been triaging a lot of rsync issues so this is likely fixed from a prior PR.

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants