Skip to content

Fix stale volume file on overwrite - #497

Open
HussainAther wants to merge 1 commit into
OpenwaterHealth:mainfrom
HussainAther:fix/issue-136-volume-overwrite-cleanup
Open

Fix stale volume file on overwrite#497
HussainAther wants to merge 1 commit into
OpenwaterHealth:mainfrom
HussainAther:fix/issue-136-volume-overwrite-cleanup

Conversation

@HussainAther

Copy link
Copy Markdown

Fixes #136.

When Database.write_volume() overwrites an existing volume using a different
source filename, the previously associated volume data file remains in the
database directory.

This change records the existing volume data file before overwrite and removes
it after the replacement file has been copied successfully.

Validation:

  • pytest tests/test_database.py -k issue_136 -v
  • 1 passed, 56 deselected

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.

Overwriting a volume can leave a dangling volume file in the database

1 participant