Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(binaryfile): accommodate windows drives for in-place reversal #2312

Merged
wpbonelli merged 3 commits into
modflowpy:developfrom
wpbonelli:fix-reverse
Sep 16, 2024
Merged

fix(binaryfile): accommodate windows drives for in-place reversal #2312
wpbonelli merged 3 commits into
modflowpy:developfrom
wpbonelli:fix-reverse

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Sep 16, 2024

Copy link
Copy Markdown
Member

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
@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