-
Notifications
You must be signed in to change notification settings - Fork 58
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
Fix up path prefix check for windows #656
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a system to test this on, but this looks reasonable to me. Thanks for addressing this!
tough/src/target_name.rs
Outdated
// If the first component isn't the main separator ( unix `/`, windows '\' ) then there is a bug or behavior change in | ||
// absolutize_from. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we wrap comments at 100-char width.
// If the first component isn't the main separator ( unix `/`, windows '\' ) then there is a bug or behavior change in | |
// absolutize_from. | |
// If the first component isn't the main separator ( unix `/`, windows '\' ) then there | |
// is a bug or behavior change in absolutize_from. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated that. I thought that would be handled by rustfmt.
I guess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 🚀
Issue #, if available:
#347 (somewhat, I think)
Description of changes:
When loading a repository, the absolutized path will start with \ instead of /, so I changed It to use
std::path::MAIN_SEPARATOR_STR
. This allows me to use the Repository struct on Windows properly.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.