diff options
Diffstat (limited to 'engine/dconf-engine-source-service.c')
-rw-r--r-- | engine/dconf-engine-source-service.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/engine/dconf-engine-source-service.c b/engine/dconf-engine-source-service.c index 805a2d8..0bd0c05 100644 --- a/engine/dconf-engine-source-service.c +++ b/engine/dconf-engine-source-service.c @@ -55,22 +55,27 @@ dconf_engine_source_service_reopen (DConfEngineSource *source) filename = g_build_filename (g_get_user_runtime_dir (), "dconf-service", source->name, NULL); - /* If the file does not exist, kick the service to have it created. */ - if (access (filename, R_OK) != 0) - dconf_engine_dbus_call_sync_func (source->bus_type, source->bus_name, source->object_path, - "ca.desrt.dconf.Writer", "Init", NULL, NULL, NULL); - - table = gvdb_table_new (filename, FALSE, &error); + table = gvdb_table_new (filename, FALSE, NULL); if (table == NULL) { - if (!did_warn) + /* If the file does not exist, kick the service to have it created. */ + dconf_engine_dbus_call_sync_func (source->bus_type, source->bus_name, source->object_path, + "ca.desrt.dconf.Writer", "Init", g_variant_new ("()"), NULL, NULL); + + /* try again */ + table = gvdb_table_new (filename, FALSE, &error); + + if (table == NULL) { - g_critical ("unable to open file '%s': %s; expect degraded performance", filename, error->message); - did_warn = TRUE; - } + if (!did_warn) + { + g_warning ("unable to open file '%s': %s; expect degraded performance", filename, error->message); + did_warn = TRUE; + } - g_error_free (error); + g_error_free (error); + } } g_free (filename); |