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

Converting path separators in expand_path if on a POSIX system #1477

Conversation

phargogh
Copy link
Member

This patch fixes an issue most common when loading datastacks created on a Windows computer and then loaded on Linux/OSX, and it's only because python doesn't handle mixed path separators at all.

Fixes #1065

Checklist

  • Updated HISTORY.rst and link to any relevant issue (if these changes are user-facing)
    - [ ] Updated the user's guide (if needed)
    - [ ] Tested the Workbench UI (if relevant)

@dcdenu4 dcdenu4 added this to the 3.14.1 milestone Dec 14, 2023
…065-tables-in-datastack-archives-not-loading-in-hra

Conflicts:
	HISTORY.rst
@phargogh
Copy link
Member Author

Alas, PathLib does not have a way to magically sanitize windows path separators on a mac, probably because there's still the problem of \ being a valid POSIX character. Our safest bet is to handle this procedurally, as described in #1479.

I'll proceed with fixing these merge conflicts and the failing tests.

@emlys emlys requested a review from dcdenu4 December 14, 2023 21:01
Copy link
Member

@dcdenu4 dcdenu4 left a comment

Choose a reason for hiding this comment

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

Looks good!

@dcdenu4 dcdenu4 merged commit cfb581f into natcap:main Dec 14, 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.

Criteria table from datastack archive produced by HRA doesn't work
3 participants