summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2014-12-20 07:14:33 +0200
committerOndrej Holy <oholy@redhat.com>2015-01-06 10:45:21 +0100
commit18406e7d02596364a799beec1ef9d08c0493ea96 (patch)
tree80836cbf384b99ffe8ddd1f8754f7c4b956a8f6d
parentcd13e26d6eb7f3fcc2a915afd3bd4dd9ee54392e (diff)
downloadgvfs-18406e7d02596364a799beec1ef9d08c0493ea96.tar.gz
client: Strip remote dbus error when setting metadata fails
Without this, if the function fails, the error presented to the user looks like: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code1: Can't find metadata file /home/ross/.local/share/gvfs-metadata/home https://bugzilla.gnome.org/show_bug.cgi?id=598561
-rw-r--r--client/gdaemonvfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index 1060c440..19e65b1a 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -1341,6 +1341,8 @@ g_daemon_vfs_local_file_set_attributes (GVfs *vfs,
error))
{
res = FALSE;
+ if (error && *error)
+ g_dbus_error_strip_remote_error (*error);
error = NULL; /* Don't set further errors */
for (i = 0; attributes[i] != NULL; i++)
g_file_info_set_attribute_status (info, attributes[i],