Skip to content

Commit

Permalink
Windows: assume rsync from https://www.itefix.net/cwrsync
Browse files Browse the repository at this point in the history
  • Loading branch information
pjknowles committed Feb 22, 2024
1 parent e4c55a3 commit ea67a64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sjef/util/Job.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ std::tuple<bool, std::string, std::string> sjef::util::Job::push_rundir(int verb
command += " --exclude=Info.plist --exclude=.Info.plist.writing_object";
#ifdef WIN32
// rsync interprets c:\a\b as a remote filename so windows filenames cause it to fail
// in MSYS2 the C: drive is mounted as /c/
// convert c:\A\B -> c/a/b and pre-prepend /
// in cwrsync the C: drive is mounted as /cygdrive/c/
// convert c:\A\B -> c/a/b and pre-prepend /cygdrive/
// also ControlPath socket special files do not work on Windows
command += " --rsh '/usr/bin/ssh'";
std::string fwin = m_project.filename("", "", 0).string();
std::replace(fwin.begin(), fwin.end(), '\\', '/');
std::replace(fwin.begin(), fwin.end(), ':', '/');
command += " '/" + fwin + "/'";
command += " '/cygdrive/" + fwin + "/'";
#else
command += " --rsh 'ssh -o ControlPath=~/.ssh/sjef-control-%h-%p-%r -o ControlMaster=auto -o ControlPersist=300'";
command += " '" + m_project.filename("", "", 0).string() + "/'";
Expand Down

0 comments on commit ea67a64

Please sign in to comment.