diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-06-25 09:20:44 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2009-06-25 09:20:44 +0200 |
commit | 74b5208891e87f88f5902c427fe63bf2bf67257e (patch) | |
tree | 250beb9d31cd8f5095ea9f4f11af9d055038cb3b /client | |
parent | 4d7f64d2060884441d39726ce03393b2db597e06 (diff) | |
download | gvfs-74b5208891e87f88f5902c427fe63bf2bf67257e.tar.gz |
Support unsetting metadata in g_file_set_attributes_from_info()
Diffstat (limited to 'client')
-rw-r--r-- | client/gdaemonvfs.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c index a352cfd7..06afd6cd 100644 --- a/client/gdaemonvfs.c +++ b/client/gdaemonvfs.c @@ -1318,6 +1318,21 @@ g_daemon_vfs_local_file_set_attributes (GVfs *vfs, g_file_info_set_attribute_status (info, attributes[i], G_FILE_ATTRIBUTE_STATUS_SET); } + else if (type == G_FILE_ATTRIBUTE_TYPE_INVALID) + { + if (meta_tree_lookup_key_type (tree, tree_path, key) != META_KEY_TYPE_NONE) + { + char c = 0; + num_set++; + /* Byte => unset */ + _g_dbus_message_append_args (message, + DBUS_TYPE_STRING, &key, + DBUS_TYPE_BYTE, &c, + 0); + } + g_file_info_set_attribute_status (info, attributes[i], + G_FILE_ATTRIBUTE_STATUS_SET); + } else { res = FALSE; |