forked from enlightenment/efl
parent
3a1d70fb06
commit
5aa07e60c6
|
@ -367,21 +367,31 @@ eet_flush(Eet_File *ef)
|
||||||
return EET_ERROR_NONE;
|
return EET_ERROR_NONE;
|
||||||
|
|
||||||
write_error:
|
write_error:
|
||||||
fclose(ef->fp);
|
|
||||||
ef->fp = NULL;
|
|
||||||
switch (ferror(ef->fp))
|
switch (ferror(ef->fp))
|
||||||
{
|
{
|
||||||
case EFBIG:
|
case EFBIG:
|
||||||
|
fclose(ef->fp);
|
||||||
|
ef->fp = NULL;
|
||||||
return EET_ERROR_WRITE_ERROR_FILE_TOO_BIG;
|
return EET_ERROR_WRITE_ERROR_FILE_TOO_BIG;
|
||||||
case EIO:
|
case EIO:
|
||||||
|
fclose(ef->fp);
|
||||||
|
ef->fp = NULL;
|
||||||
return EET_ERROR_WRITE_ERROR_IO_ERROR;
|
return EET_ERROR_WRITE_ERROR_IO_ERROR;
|
||||||
case ENOSPC:
|
case ENOSPC:
|
||||||
|
fclose(ef->fp);
|
||||||
|
ef->fp = NULL;
|
||||||
return EET_ERROR_WRITE_ERROR_OUT_OF_SPACE;
|
return EET_ERROR_WRITE_ERROR_OUT_OF_SPACE;
|
||||||
case EPIPE:
|
case EPIPE:
|
||||||
|
fclose(ef->fp);
|
||||||
|
ef->fp = NULL;
|
||||||
return EET_ERROR_WRITE_ERROR_FILE_CLOSED;
|
return EET_ERROR_WRITE_ERROR_FILE_CLOSED;
|
||||||
default:
|
default:
|
||||||
|
fclose(ef->fp);
|
||||||
|
ef->fp = NULL;
|
||||||
return EET_ERROR_WRITE_ERROR;
|
return EET_ERROR_WRITE_ERROR;
|
||||||
}
|
}
|
||||||
|
fclose(ef->fp);
|
||||||
|
ef->fp = NULL;
|
||||||
return EET_ERROR_WRITE_ERROR;
|
return EET_ERROR_WRITE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue