Minor error handling fixes in file_utils
Reviewers: devilhorns Differential Revision: https://phab.enlightenment.org/D1410
This commit is contained in:
parent
89c5bfab0d
commit
7ee9b2677a
|
@ -66,13 +66,16 @@ _save_markup_utf8(const char *file, const char *text)
|
|||
f = fopen(file, "wb");
|
||||
if (!f)
|
||||
{
|
||||
// FIXME: report a write error
|
||||
EINA_LOG_ERR("could not open '%s' for writing.", file);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
if (text)
|
||||
{
|
||||
fputs(text, f); // FIXME: catch error
|
||||
if(fputs(text, f)==EOF)
|
||||
{
|
||||
EINA_LOG_ERR("Error in writing to '%s'.", file);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
return EINA_TRUE;
|
||||
|
|
Loading…
Reference in New Issue