summaryrefslogtreecommitdiff
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
parent5507a840289c25deb753389d269c751415510bf5 (diff)
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)
923 return n; 923 return n;
924 924
925 on_error: 925 on_error:
926 ERR("Could not open file [%s].", filename);
927
926 free(filename); 928 free(filename);
927 if (fd >= 0) close(fd); 929 if (fd >= 0) close(fd);
928 return NULL; 930 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)
780 NULL); 780 NULL);
781 781
782 if (handle == INVALID_HANDLE_VALUE) 782 if (handle == INVALID_HANDLE_VALUE)
783 return NULL; 783 goto close_file;
784 784
785 fm = CreateFileMapping(handle, NULL, PAGE_READONLY, 0, 0, NULL); 785 fm = CreateFileMapping(handle, NULL, PAGE_READONLY, 0, 0, NULL);
786 if (!fm) 786 if (!fm)
@@ -857,6 +857,7 @@ eina_file_open(const char *path, Eina_Bool shared)
857 close_handle: 857 close_handle:
858 CloseHandle(handle); 858 CloseHandle(handle);
859 859
860 close_file:
860 ERR("Could not open file [%s].", filename); 861 ERR("Could not open file [%s].", filename);
861 free(filename); 862 free(filename);
862 863