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 crash when --input-dir and --output-dir match #39

Merged
merged 2 commits into from
Jan 17, 2024
Merged

Conversation

dennisbrookner
Copy link
Member

As noted in #38, matchmaps crashes when the specified input and output directories do not match (most likely because neither is specified and they both default to ./). This PR fixes this behavior by wrapping the offending shutil.copy() call in a try/except block. A message is printed to the user noting that the input and output directories match, and that while this is acceptable, it is not the recommended directory structure.

I have confirmed for all three command-line utilities that there are no unexpected consequences downstream of this behavior.

@dennisbrookner dennisbrookner merged commit d59fa78 into main Jan 17, 2024
4 checks passed
@dennisbrookner dennisbrookner deleted the output_dir branch January 17, 2024 20:01
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