[gconf] Add a warning for a common mistake



commit a22cb09f2bace2c3c1e3b946a2ee32398ad3dbf8
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Apr 22 20:21:49 2010 -0400

    Add a warning for a common mistake
    
    Give a hint that keys on the left are not supposed to be full paths.

 gsettings/gsettings-data-convert.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gsettings/gsettings-data-convert.c b/gsettings/gsettings-data-convert.c
index a518336..0164dca 100644
--- a/gsettings/gsettings-data-convert.c
+++ b/gsettings/gsettings-data-convert.c
@@ -98,6 +98,13 @@ handle_file (const gchar *filename)
 
       for (j = 0; keys[j]; j++)
         {
+          if (strchr (keys[j], '/') != 0)
+            {
+              g_printerr ("Key '%s' contains a '/'\n", keys[j]);
+
+              continue;
+            }
+
           error = NULL;
           if ((gconf_key = g_key_file_get_string (keyfile, groups[i], keys[j], &error)) ==  NULL)
             {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]