Skip to content

Safely overwrite config files when moving temporary files#13

Open
jlegrand62 wants to merge 1 commit into
devfrom
hotfix/romi_run_task
Open

Safely overwrite config files when moving temporary files#13
jlegrand62 wants to merge 1 commit into
devfrom
hotfix/romi_run_task

Conversation

@jlegrand62

Copy link
Copy Markdown
Member
  • Compute the destination path as Path(dataset_path) / Path(cfg_file_path).name.
  • Check for an existing file at the destination and remove it using unlink() before moving.
  • Add error handling to log and raise exceptions if the removal fails.
  • Move the configuration file to the computed destination path instead of the root directory.

- Compute destination path `dest_cfg_path` as `Path(dataset_path) / Path(cfg_file_path).name`
- Check for existing file and remove it with `unlink()` before moving
- Add error handling to log and raise if removal fails
- Move the config file to `dest_cfg_path` instead of the directory root`romitask/src/romitask/cli/romi_run_task.py`
@jlegrand62 jlegrand62 self-assigned this Jun 12, 2026
@jlegrand62 jlegrand62 added bug Something isn't working enhancement New feature or request labels Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant