- sub->parent = current;
- sub->handle = handle;
-
- char *encoded = encode_URI_component (entry);
- if ((encoded == NULL)
- || (asprintf (&sub->uri, "%s/%s", current->uri, encoded) == -1))
- sub->uri = NULL;
- free (encoded);
-
- if ((p_sys->mode == MODE_NONE)
- || fstat (dirfd (handle), &sub->st)
- || has_inode_loop (sub)
- || (sub->uri == NULL))
- {
- free (entry);
- closedir (handle);
- free (sub->uri);
- free (sub);
- return NULL;
- }
- p_sys->current = sub;
-
- /* Add node to xspf extension */
- char *old_xspf_extension = p_sys->psz_xspf_extension;
- if (old_xspf_extension == NULL)
- {
- free (entry);
- goto fatal;
- }
-
- char *title = convert_xml_special_chars (entry);