efl.file: use ENOENT as default error if file opening fails and errno isn't set

Summary:
ensure that a nonzero return happens here so that failure cases can be
correctly detected

Reviewers: vtorri, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8103
This commit is contained in:
Mike Blumenkrantz 2019-03-06 08:37:25 -05:00
parent 8f9cbdc09e
commit 9acd9a16f8
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ _efl_file_load(Eo *obj, Efl_File_Data *pd)
{
Eina_File *f;
f = eina_file_open(pd->vpath, EINA_FALSE);
if (!f) return errno;
if (!f) return errno ?: ENOENT;
pd->file_opened = EINA_TRUE;
pd->setting = 1;
ret = efl_file_mmap_set(obj, f);