allow reusing folders
Simple proposal PR to allow reusing existing folders instead of having to delete and recreate them or create duplicates.
Open to suggestions for code changes.
Fixes #182
@wonder-sk can you look at this PR please?
@wonder-sk did you have any reservation or wanted me to make changes to this? I think the risk is fairly low, though this was a quick pr that could be improved if needed.
hi @roya0045 - apologies for the long silence. I think this approach overall makes sense, but there are two important bits missing by the look at the code:
- we should check first whether the project in the selected directory is the same as the project the user is trying to download
- when reusing a project directory, we should also pull the latest changes from the server (instead of just leaving the directory with possibly outdated version of the project)
hi @roya0045 - apologies for the long silence. I think this approach overall makes sense, but there are two important bits missing by the look at the code:
- we should check first whether the project in the selected directory is the same as the project the user is trying to download
- when reusing a project directory, we should also pull the latest changes from the server (instead of just leaving the directory with possibly outdated version of the project)
I made a modified proposal, let me know what you think of it.
@wonder-sk Are the modifications adequate?
Tested on a more recent version and the following part is proving problematic https://github.com/MerginMaps/qgis-mergin-plugin/blob/93224742a112363f412354163f15d66752c0f251/Mergin/projects_manager.py#L191-L195
I have no clue why this exists.