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

fil2h5, h52fil, dice, and bl_scrunch can mangle the output file name #251

Closed
texadactyl opened this issue Jan 20, 2022 · 0 comments
Closed
Assignees
Labels

Comments

@texadactyl
Copy link
Contributor

texadactyl commented Jan 20, 2022

In fil2h5, 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 string replace function.

Solution:

  • 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!).
@texadactyl texadactyl self-assigned this Jan 20, 2022
@texadactyl texadactyl added the bug label Jan 20, 2022
@texadactyl texadactyl changed the title fil2h5 & h52fil can mangle the output file name fil2h5, h52fil, dice, and bl_scrunch can mangle the output file name Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant