forked from enlightenment/efl
Elm_Entry: Removed empty line and added error message
Summary: Resolved FIXME in utf8_markup_save by adding error messages for fopen and fputs command Signed-off-by: kabeer khan <kabeer.khan@samsung.com> Reviewers: devilhorns, seoz Reviewed By: seoz Differential Revision: https://phab.enlightenment.org/D1888
This commit is contained in:
parent
c9c5463c7e
commit
d87b5c0e41
|
@ -207,18 +207,18 @@ _utf8_markup_save(const char *file,
|
|||
if ((!text) || (!text[0]))
|
||||
{
|
||||
ecore_file_unlink(file);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
f = fopen(file, "wb");
|
||||
if (!f)
|
||||
{
|
||||
// FIXME: report a write error
|
||||
ERR("Failed to open %s for writing", file);
|
||||
return;
|
||||
}
|
||||
|
||||
fputs(text, f); // FIXME: catch error
|
||||
if (fputs(text, f) == EOF)
|
||||
ERR("Failed to write text to file %s", file);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue