Geary.Controller: Migrate release config if needed

If the current config directory is empty, go looking for config data
in other well known locations and if found, copy it all across from
the most recently modified directory.

This supports migrating config from non-Flatpak to Flatpak locations,
and release config to devel profile locations.

Fixes #326
This commit is contained in:
Michael Gratton 2020-10-13 23:42:53 +11:00 committed by Michael James Gratton
parent 468ea6df58
commit 9658e9e3b4
3 changed files with 177 additions and 3 deletions

View file

@ -182,6 +182,9 @@ internal class Application.Controller :
// Migrate configuration if necessary.
Util.Migrate.xdg_config_dir(config_dir, data_dir);
Util.Migrate.release_config(
application.get_config_search_path(), config_dir
);
// Hook up cert, accounts and credentials machinery