gsettings tool: report failure to write
authorMatthias Clasen <mclasen@redhat.com>
Fri, 19 Jul 2013 23:41:24 +0000 (19:41 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 19 Jul 2013 23:43:48 +0000 (19:43 -0400)
If a key is locked down, we should report an error if we
fail to write it.

https://bugzilla.gnome.org/show_bug.cgi?id=704424

gio/gsettings-tool.c

index 57beb7b..7d9c250 100644 (file)
@@ -513,7 +513,11 @@ gsettings_set (GSettings   *settings,
       exit (1);
     }
 
-  g_settings_set_value (settings, key, new);
+  if (!g_settings_set_value (settings, key, new))
+    {
+      g_printerr (_("The key is not writable\n"));
+      exit (1);
+    }
 
   g_settings_sync ();