aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@samsung.com>2014-02-21 17:13:09 +0900
committerCedric BAIL <cedric.bail@samsung.com>2014-02-21 17:13:09 +0900
commit58f424a199829171ff77e6a46f0f5850fdce73fd (patch)
tree30b41203a302fe7d094380d155527bf2be15d429 /src
parentevil: don't depend on the toolchain defined macro. (diff)
downloadefl-58f424a199829171ff77e6a46f0f5850fdce73fd.tar.gz
eina: add more debug information when failing to open a file.
Diffstat (limited to 'src')
-rw-r--r--src/lib/eina/eina_file.c2
-rw-r--r--src/lib/eina/eina_file_win32.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c
index ca2fe612dc..8bc1f0c5d5 100644
--- a/src/lib/eina/eina_file.c
+++ b/src/lib/eina/eina_file.c
@@ -923,6 +923,8 @@ eina_file_open(const char *path, Eina_Bool shared)
return n;
on_error:
+ ERR("Could not open file [%s].", filename);
+
free(filename);
if (fd >= 0) close(fd);
return NULL;
diff --git a/src/lib/eina/eina_file_win32.c b/src/lib/eina/eina_file_win32.c
index 2d219a1d1c..5839230ca1 100644
--- a/src/lib/eina/eina_file_win32.c
+++ b/src/lib/eina/eina_file_win32.c
@@ -780,7 +780,7 @@ eina_file_open(const char *path, Eina_Bool shared)
NULL);
if (handle == INVALID_HANDLE_VALUE)
- return NULL;
+ goto close_file;
fm = CreateFileMapping(handle, NULL, PAGE_READONLY, 0, 0, NULL);
if (!fm)
@@ -857,6 +857,7 @@ eina_file_open(const char *path, Eina_Bool shared)
close_handle:
CloseHandle(handle);
+ close_file:
ERR("Could not open file [%s].", filename);
free(filename);