diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-09-16 14:54:39 +0200 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-09-17 15:27:12 +0200 |
commit | b358ca19acb2063775bb6688d654cc684cda6576 (patch) | |
tree | 2d44544c9b46c99ce4734ad5551761baa9d5a3f2 /client | |
parent | a3da826b69909ca1d9b670f4412c2ba2305a9440 (diff) | |
download | gvfs-b358ca19acb2063775bb6688d654cc684cda6576.tar.gz |
Make sure metadata is always returned by query_writable_namespaces()
Diffstat (limited to 'client')
-rw-r--r-- | client/gdaemonfile.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c index 8e14929e..efc46b46 100644 --- a/client/gdaemonfile.c +++ b/client/gdaemonfile.c @@ -2156,26 +2156,28 @@ g_daemon_file_query_writable_namespaces (GFile *file, GFileAttributeInfoList *list; DBusMessageIter iter; - reply = do_sync_path_call (file, + reply = do_sync_path_call (file, G_VFS_DBUS_MOUNT_OP_QUERY_WRITABLE_NAMESPACES, NULL, NULL, cancellable, error, 0); - if (reply == NULL) - return NULL; + if (reply) + { + dbus_message_iter_init (reply, &iter); + list = _g_dbus_get_attribute_info_list (&iter, error); + dbus_message_unref (reply); + } + else + { + list = g_file_attribute_info_list_new (); + } - dbus_message_iter_init (reply, &iter); - list = _g_dbus_get_attribute_info_list (&iter, error); - - dbus_message_unref (reply); + g_file_attribute_info_list_add (list, + "metadata", + G_FILE_ATTRIBUTE_TYPE_STRING, /* Also STRINGV, but no way express this ... */ + G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE | + G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED); - if (list) - g_file_attribute_info_list_add (list, - "metadata", - G_FILE_ATTRIBUTE_TYPE_STRING, /* Also STRINGV, but no way express this ... */ - G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE | - G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED); - return list; } |