service: Allow opening corrupt GVDB files when writing
commit5ee749cd25f221c382fa4b9545cff62eefcb10cf
authorPhilip Withnall <withnall@endlessm.com>
Wed, 1 Aug 2018 14:14:19 +0000 (1 15:14 +0100)
committerPhilip Withnall <withnall@endlessm.com>
Thu, 16 Aug 2018 17:58:27 +0000 (16 18:58 +0100)
treed56e111398b8d9832f479b5614c5a41e0d529274
parente960b50696b95f4b035787e9cbceaa549c172c91
service: Allow opening corrupt GVDB files when writing

If a GVDB file cannot be opened due to being corrupt, move it out of the
way, warn, and open a new blank database instead.

This prevents the situation where a corrupt database stops the entire
desktop session from loading.

Note that the dconf_gvdb_utils_read_file() code path is only taken
inside DConfWriter. The DConf engine sources (such as
dconf-engine-source-system.c) open the GVDB tables separately, and
already all handle errors gracefully.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/glib/issues/1454
service/dconf-gvdb-utils.c