Generate proper remote path from Windows path #287
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for this software! I had been using my own bash script for this until now and was going to implement it in Rust, but now that you did it I don't have to!
Anyway, Windows client support opens up the use case of letting my poor friends with Windows machines build things on my server. Without this patch, mainframer tries to create a directory directly under my home directory (instead of under
~/mainframer
) and with a name containing a colon which causes rsync to fail.This fixes two things with canonical paths in Windows:
It uses backslashes as path separator. Replace this with "/".
As of the current implementation of std::fs::canonicalize, the path begins with "\?\C:", where C is the drive letter. Replace this with "/C/" to avoid the "?" and ":".
With this fix, I can run the client in MSYS2 in Windows. It should work with any shell where there is an rsync command, like Cygwin.