Skip to content

Safer file saving #27

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

Merged
merged 3 commits into from
Mar 21, 2024
Merged

Safer file saving #27

merged 3 commits into from
Mar 21, 2024

Conversation

egavazzi
Copy link
Owner

@egavazzi egavazzi commented Mar 21, 2024

  • Rework the rename_if_exists(savefile) function to work with all types of file extensions and also folders. Add also a docstring to it.
  • Use the improved rename_if_exists(savefile) function when creating the folders where simulation data should be saved. That way, we reduce the risk of accidentally writing over old simulation data.

@egavazzi egavazzi merged commit bf038ad into main Mar 21, 2024
1 check passed
@egavazzi egavazzi deleted the safer_file_saving branch March 21, 2024 17:06
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