summaryrefslogtreecommitdiff
path: root/gio/gsettings-tool.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-07-19 19:41:24 -0400
committerMatthias Clasen <mclasen@redhat.com>2013-07-19 19:43:48 -0400
commit8753df9d700dcc132f77432d76863884ab21fa87 (patch)
tree7470ad684561edefd82c3ef32cd2481d38aa4702 /gio/gsettings-tool.c
parentdc87c453fbdcf568990c0e7587fa4607f5e148b9 (diff)
gsettings tool: report failure to write
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
Diffstat (limited to 'gio/gsettings-tool.c')
-rw-r--r--gio/gsettings-tool.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gio/gsettings-tool.c b/gio/gsettings-tool.c
index 57beb7b40..7d9c25094 100644
--- a/gio/gsettings-tool.c
+++ b/gio/gsettings-tool.c
@@ -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 ();