added (optional) backup feat for user#50
Open
snennis wants to merge 2 commits intoWhereGroup:mainfrom
Open
Conversation
for more information, see https://pre-commit.ci
jmkerloch
requested changes
Oct 3, 2025
Collaborator
jmkerloch
left a comment
There was a problem hiding this comment.
For me there is a regression for action not related to QDT profile export.
This should be fixed.
| self.target_plugins = collect_plugin_names(self.target_qgis_ini_file) | ||
|
|
||
| def make_backup(self, profile_name: str) -> Optional[str]: | ||
| def make_backup(self, profile_name: str, backup_dir: str) -> Optional[str]: |
Collaborator
| ###################################################################### | ||
| backup_path = Path(backup_dir) | ||
|
|
||
| if not backup_path.exists(): |
Collaborator
There was a problem hiding this comment.
If it doesn't exists it should be created. What do you think @kannes ?
| backup_path = ( | ||
| self.qdt_backup_file_widget.filePath() | ||
| ) # NEW sets backup_path from Widget | ||
| if profile_path and backup_path: # NEW check for both |
Collaborator
There was a problem hiding this comment.
See my remark for the parameter backup_path in make_backup. We should be able to left the path empty. In this case default value from profile manager will be used Path.home() / "QGIS Profile Manager Backup")
Contributor
|
Thanks for your review @jmkerloch! I hope someone from us will have time to check back on it soonish. Feel welcome to change/fix things as you like! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added a possibility for the user to choose the path for their backup file.