[gconf] Do not print an error on the first ever run of gsettings-data-convert
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gconf] Do not print an error on the first ever run of gsettings-data-convert
- Date: Thu, 20 May 2010 14:20:45 +0000 (UTC)
commit a2a023e2cf102e5424371b78067b47ad0462773a
Author: Richard Hughes <richard hughsie com>
Date: Thu May 20 14:58:40 2010 +0100
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
gsettings/gsettings-data-convert.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gsettings/gsettings-data-convert.c b/gsettings/gsettings-data-convert.c
index 3fa0712..156045a 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))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]