diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-06-16 15:03:09 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-06-16 12:23:07 -0400 |
commit | b6b0b1b5b2581bbb66d726ed1f1463eca1d4a740 (patch) | |
tree | e54e3e4591ad170d5fdc7881cbe5ac9e247795ec /src/lib/efreet | |
parent | abe4c8d772256c40b3b67c8035e333c1177ed6c4 (diff) | |
download | efl-b6b0b1b5b2581bbb66d726ed1f1463eca1d4a740.tar.gz |
efreet: don't raise ERR on empty file in efreet_xml_new()
this is not an error, there is nothing to parse
@fix
Diffstat (limited to 'src/lib/efreet')
-rw-r--r-- | src/lib/efreet/efreet_xml.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/efreet/efreet_xml.c b/src/lib/efreet/efreet_xml.c index e29932d7d8..05261b2a4a 100644 --- a/src/lib/efreet/efreet_xml.c +++ b/src/lib/efreet/efreet_xml.c @@ -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); |