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(binaryfile): accommodate windows drives for in-place reversal #2312

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

wpbonelli
Copy link
Member

@wpbonelli wpbonelli commented Sep 16, 2024

The reverse() methods on HeadFile and CellBudgetFile would fail on an in-place reversal if the system temp dir occupied a different drive than the original file. Use shutil.move() instead of Path.replace() per SO discussion here.

@wpbonelli wpbonelli marked this pull request as ready for review September 16, 2024 15:37
@wpbonelli wpbonelli merged commit 181e101 into modflowpy:develop Sep 16, 2024
25 of 26 checks passed
@wpbonelli wpbonelli deleted the fix-reverse branch September 16, 2024 15:47
martclanor pushed a commit to martclanor/flopy that referenced this pull request Sep 21, 2024
…dflowpy#2312)

The reverse() methods on HeadFile and CellBudgetFile would fail on an in-place reversal if the system temp dir occupied a different drive than the original file. Use shutil.move() instead of Path.replace() to accommodate the cross-drive move.
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.

1 participant