qgis-plugin icon indicating copy to clipboard operation
qgis-plugin copied to clipboard

When project gets deleted on server ...

Open saberraz opened this issue 5 years ago • 4 comments

The plugin still keeps the association with the remote project. IMO, the project should remain on the local folder but the reference (.mergin folder) should be removed locally, to allow user to download a project with the same name.

saberraz avatar Jan 29 '20 17:01 saberraz

Good point! I think we should introduce new local project state, e.g. 'dangling local project'.

After browser refresh we can check against server projects and if it does not exist or server version is lower than local (which actually means that remote project has been deleted and recreated) we would mark such local project as dangling with following actions:

  • unsync - preserve data but remove .mergin folder and reference in .ini file
  • remove - delete whole folder and remove reference in .ini file

varmar05 avatar Jan 30 '20 07:01 varmar05

Sounds good. One more option would be to have project unique ID returned in project info - it could be simply pkey from the internal database. That way we could differentiate between projects with certainty. (Avoiding the need to do guessing whether a local project is really the same as the server project.)

wonder-sk avatar Jan 30 '20 09:01 wonder-sk

Should we take the same approach in Input too?

saberraz avatar Jan 30 '20 09:01 saberraz

Yes ideally Input should also have some logic to handle it - I have raised a new ticket for that...

wonder-sk avatar Jan 30 '20 09:01 wonder-sk