[gvfs/gnome-3-12] client: Strip remote dbus error when setting metadata fails



commit c9087446a18cacf0a4efa1d90360eceaf00c51c9
Author: Ross Lagerwall <rosslagerwall gmail com>
Date:   Sat Dec 20 07:14:33 2014 +0200

    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

 client/gdaemonvfs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index e1aa8d8..9159840 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -1331,6 +1331,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],


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