summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2010-05-20 14:58:40 +0100
committerRichard Hughes <richard@hughsie.com>2010-05-20 15:20:37 +0100
commita2a023e2cf102e5424371b78067b47ad0462773a (patch)
treeea6a366d216ac098b0fe59e1f32d8fa40e47c670
parentb244603a47e2eee6754c05e87ac35c506b409cb1 (diff)
downloadgconf-a2a023e2cf102e5424371b78067b47ad0462773a.tar.gz
Do not print an error on the first ever run of gsettings-data-convert
It's normal for ~/.local/share/gsettings-data-convert not to exist if the tool has never been run
-rw-r--r--gsettings/gsettings-data-convert.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gsettings/gsettings-data-convert.c b/gsettings/gsettings-data-convert.c
index 3fa07127..156045a4 100644
--- a/gsettings/gsettings-data-convert.c
+++ b/gsettings/gsettings-data-convert.c
@@ -275,6 +275,10 @@ load_state (time_t *mtime,
filename = g_build_filename (g_get_user_data_dir (), "gsettings-data-convert", NULL);
keyfile = g_key_file_new ();
+ /* ensure file exists */
+ if (!g_file_test (filename, G_FILE_TEST_EXISTS))
+ return;
+
error = NULL;
if (!g_key_file_load_from_file (keyfile, filename, 0, &error))
{