rs-station / matchmaps

https://rs-station.github.io/matchmaps/
Other
2 stars 0 forks source link

Fix crash when `--input-dir` and `--output-dir` match #39

Closed dennisbrookner closed 7 months ago

dennisbrookner commented 7 months ago

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.