eina: add more debug information when failing to open a file.

This commit is contained in:
Cedric BAIL 2014-02-21 17:13:09 +09:00
parent 5507a84028
commit 58f424a199
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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);