vorta icon indicating copy to clipboard operation
vorta copied to clipboard

Delete existing sources on profile overwrite #1942

Open TheLazron opened this issue 1 year ago • 3 comments
trafficstars

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):

1 3 4

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.

TheLazron avatar Mar 06 '24 14:03 TheLazron

THank you very much. Looks good! Is it possible to add a test case checking for this bug?

real-yfprojects avatar Apr 01 '24 14:04 real-yfprojects

Sure!

TheLazron avatar Apr 02 '24 19:04 TheLazron

Hey @TheLazron are you still working on this?

shivansh02 avatar May 28 '24 12:05 shivansh02