- filename = p->fts_name;
- if (p->fts_level != FTS_ROOTLEVEL)
- {
- snprintf(full_path, sizeof full_path, "%s/%s",
- p->fts_parent->fts_accpath, p->fts_name);
- filename = full_path;
- }
- /* symlinks can not have ACLs */
- acl = acl_get_link_np(filename, ACL_TYPE_EXTENDED);
- if (acl && acl_get_entry(acl, ACL_FIRST_ENTRY, &dummy) == -1) {
- acl_free(acl);
- acl = NULL;
- }
- xattr = listxattr(filename, NULL, 0, XATTR_NOFOLLOW);
- if (xattr < 0)
- xattr = 0;
- str[1] = '\0';
- if (xattr > 0)
- str[0] = '@';
- else if (acl != NULL)
- str[0] = '+';
- else
- str[0] = ' ';