[tracker/gsettings-keyfile-bridge: 2/2] libtracker-common: if testing old .cfg files, ensure one is always available
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/gsettings-keyfile-bridge: 2/2] libtracker-common: if testing old .cfg files, ensure one is always available
- Date: Mon, 12 Dec 2011 16:05:33 +0000 (UTC)
commit 4070ea3f6d32a090c7f3ac38297865f9d94e3e3b
Author: Aleksander Morgado <aleksander lanedo com>
Date: Mon Dec 12 16:47:41 2011 +0100
libtracker-common: if testing old .cfg files, ensure one is always available
Create the .cfg file when we detect that it doesn't exist.
src/libtracker-common/tracker-config-file.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-common/tracker-config-file.c b/src/libtracker-common/tracker-config-file.c
index 8a22f24..d45bfe6 100644
--- a/src/libtracker-common/tracker-config-file.c
+++ b/src/libtracker-common/tracker-config-file.c
@@ -582,6 +582,14 @@ tracker_config_file_migrate (TrackerConfigFile *file,
if (g_getenv ("TRACKER_USE_CONFIG_FILES")) {
UnappliedNotifyData *data;
+ /* Ensure we have the config file in place */
+ if (!file->file_exists) {
+ migrate_settings_to_keyfile (entries,
+ settings,
+ file);
+ tracker_config_file_save (file);
+ }
+
/* Keep the file around, and connect to notify::has-unapplied so
* we write back to it when g_settings_apply() is called
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]