forked from enlightenment/efl
eina: add more debug information when failing to open a file.
This commit is contained in:
parent
5507a84028
commit
58f424a199
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue