[gvfs] afp: set custom attribute "afp::children-count" if requested
- From: Christian Kellner <gicmo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] afp: set custom attribute "afp::children-count" if requested
- Date: Thu, 25 Aug 2011 19:23:58 +0000 (UTC)
commit 7ac97714d4ff436d96fabf1d2ca65ddec591f562
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Thu Jun 23 23:01:10 2011 +0200
afp: set custom attribute "afp::children-count" if requested
daemon/gvfsbackendafp.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsbackendafp.c b/daemon/gvfsbackendafp.c
index d5a31ca..28a4e29 100644
--- a/daemon/gvfsbackendafp.c
+++ b/daemon/gvfsbackendafp.c
@@ -182,8 +182,20 @@ static void fill_info (GVfsBackendAfp *afp_backend,
mod_date + afp_backend->time_diff);
}
+ /* Directory specific attributes */
+ if (directory)
+ {
+ if (bitmap & AFP_DIR_BITMAP_OFFSPRING_COUNT_BIT)
+ {
+ guint32 offspring_count;
+
+ g_vfs_afp_reply_read_uint32 (reply, &offspring_count);
+ g_file_info_set_attribute_uint32 (info, "afp::children-count", offspring_count);
+ }
+ }
+
/* File specific attributes */
- if (!directory)
+ else
{
if (bitmap & AFP_FILE_BITMAP_EXT_DATA_FORK_LEN_BIT)
{
@@ -630,6 +642,9 @@ create_dir_bitmap (GFileAttributeMatcher *matcher)
guint16 dir_bitmap;
dir_bitmap = create_filedir_bitmap (matcher);
+
+ if (g_file_attribute_matcher_matches (matcher, "afp::children-count"))
+ dir_bitmap |= AFP_DIR_BITMAP_OFFSPRING_COUNT_BIT;
return dir_bitmap;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]