vorta
vorta copied to clipboard
Delete existing sources on profile overwrite #1942
Description
If overwrite is checked on profile import, existing sources for that profile are deleted before adding the new ones from the json file for that profile
Related Issue
Fixes #1942
Motivation and Context
Checking overwrite when importing an existing profile, resulted in duplicate source folders. The changes make sure to delete the existing set of sources before adding new ones for that profile
How Has This Been Tested?
This has been tested by exporting a profile with existing sources and importing it again. After checking overwriting existing profile, only the new set of sources were being used
Screenshots (if appropriate):
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] I have read the CONTRIBUTING guide.
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.
THank you very much. Looks good! Is it possible to add a test case checking for this bug?
Sure!
Hey @TheLazron are you still working on this?