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

Fix up path prefix check for windows #656

Merged
merged 3 commits into from
Aug 21, 2023

Conversation

jon-zu
Copy link
Contributor

@jon-zu jon-zu commented Aug 18, 2023

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.

Copy link
Contributor

@stmcginnis stmcginnis left a 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!

Comment on lines 140 to 141
// If the first component isn't the main separator ( unix `/`, windows '\' ) then there is a bug or behavior change in
// absolutize_from.
Copy link
Contributor

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.

Suggested change
// 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.

Copy link
Contributor Author

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.

@cbgbt
Copy link
Contributor

cbgbt commented Aug 21, 2023

I guess cargo fmt check doesn't like the blank space at the end of the line. Happy to update the PR or let you do it!

Copy link
Contributor

@cbgbt cbgbt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🚀

@cbgbt cbgbt merged commit 53fce2d into awslabs:develop Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants