summaryrefslogtreecommitdiff
path: root/src/lib/efreet
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-06-16 15:03:09 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-06-16 12:23:07 -0400
commitb6b0b1b5b2581bbb66d726ed1f1463eca1d4a740 (patch)
treee54e3e4591ad170d5fdc7881cbe5ac9e247795ec /src/lib/efreet
parentabe4c8d772256c40b3b67c8035e333c1177ed6c4 (diff)
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.c6
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)
96 if (fd == -1) goto efreet_error; 96 if (fd == -1) goto efreet_error;
97 97
98 if (fstat(fd, &st) < 0) goto efreet_error; 98 if (fstat(fd, &st) < 0) goto efreet_error;
99 /* empty file: not an error */
100 if (!st.st_size)
101 {
102 close(fd);
103 return NULL;
104 }
99 105
100 /* let's make mmap safe and just get 0 pages for IO erro */ 106 /* let's make mmap safe and just get 0 pages for IO erro */
101 eina_mmap_safety_enabled_set(EINA_TRUE); 107 eina_mmap_safety_enabled_set(EINA_TRUE);