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;
|
return n;
|
||||||
|
|
||||||
on_error:
|
on_error:
|
||||||
|
ERR("Could not open file [%s].", filename);
|
||||||
|
|
||||||
free(filename);
|
free(filename);
|
||||||
if (fd >= 0) close(fd);
|
if (fd >= 0) close(fd);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -780,7 +780,7 @@ eina_file_open(const char *path, Eina_Bool shared)
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (handle == INVALID_HANDLE_VALUE)
|
if (handle == INVALID_HANDLE_VALUE)
|
||||||
return NULL;
|
goto close_file;
|
||||||
|
|
||||||
fm = CreateFileMapping(handle, NULL, PAGE_READONLY, 0, 0, NULL);
|
fm = CreateFileMapping(handle, NULL, PAGE_READONLY, 0, 0, NULL);
|
||||||
if (!fm)
|
if (!fm)
|
||||||
|
@ -857,6 +857,7 @@ eina_file_open(const char *path, Eina_Bool shared)
|
||||||
close_handle:
|
close_handle:
|
||||||
CloseHandle(handle);
|
CloseHandle(handle);
|
||||||
|
|
||||||
|
close_file:
|
||||||
ERR("Could not open file [%s].", filename);
|
ERR("Could not open file [%s].", filename);
|
||||||
free(filename);
|
free(filename);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue