2.0.34: Merge pull request #252 from texadactyl/master
In fil2h5, h52fil, dice, and bl_scrunch, it is possible to mangle the output file name if the input file path has an embedded "fil". In essence, the embedded "fil" will be inadvertently changed to "h5". E.g. "abc.filter.def.fil" --> "abc.h5ter.def.h5" (should be "abc.filter.def.h5"). This was caused by misuse of the Python string replace function.
Solution:
- Implemented utils.change_the_ext(path, old_ext, new_ext) will change only the final old_ext in the path or append the new_path if there is no old_ext present.
- fil2h5, h52fil, dice, and bl_scrunch call the new function.
Since the function is generic, it can also be leveraged by other projects such as turbo_seti (probably needed!).