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



commit 92fec205f59217ecb9baf4646c39f6b127ec23bb
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 d9f079f..42ca822 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -1365,6 +1365,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]