All pastes #758612 Raw Edit

Anonym

public text v1 · immutable
·published 2007-11-02 12:24 UTC
rendered paste body
@@ -381,14 +396,18 @@
   GPtrArray *names;
   GFileAttribute *attrs;
   guint32 attribute;
+  guint32 ns_id = (name_space) ? lookup_namespace (name_space) : 0;
   int i;
+ 
+  g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
 
   names = g_ptr_array_new ();
   attrs = (GFileAttribute *)info->attributes->data;
   for (i = 0; i < info->attributes->len; i++)
     {
       attribute = attrs[i].attribute;
-      g_ptr_array_add (names, g_strdup (get_attribute_for_id (attribute)));
+      if (ns_id == 0 || GET_NS (attribute) == ns_id)
+        g_ptr_array_add (names, g_strdup (get_attribute_for_id (attribute)));
     }
 
   /* NULL terminate */