git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1652
ffa7fe5e-494d-0410-b361-
a75ebd5db220
static gboolean
parse_file(struct xmldocument *document, xmlerror **error)
{
- ezxml_t root = ezxml_parse_file(document->href);
-
+ int fd;
+ ezxml_t root;
+ /* BUG workaround: ezxml parse file leaves negative fds unclosed */
+ fd = open(document->href, O_RDONLY, 0);
+ if (fd == -1)
+ return FALSE;
+ root = ezxml_parse_fd(fd);
+ close(fd);
if (!root)
return FALSE;
document->active=document->xpointer ? 0:1;