forked from enlightenment/efl
efreet: don't raise ERR on empty file in efreet_xml_new()
this is not an error, there is nothing to parse @fix
This commit is contained in:
parent
abe4c8d772
commit
b6b0b1b5b2
|
@ -96,6 +96,12 @@ efreet_xml_new(const char *file)
|
|||
if (fd == -1) goto efreet_error;
|
||||
|
||||
if (fstat(fd, &st) < 0) goto efreet_error;
|
||||
/* empty file: not an error */
|
||||
if (!st.st_size)
|
||||
{
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* let's make mmap safe and just get 0 pages for IO erro */
|
||||
eina_mmap_safety_enabled_set(EINA_TRUE);
|
||||
|
|
Loading…
Reference in New Issue