made eet_list() fail when the file isn't opened read-only or read-write

SVN revision: 13231
This commit is contained in:
tsauerbeck 2005-02-07 18:11:49 +00:00 committed by tsauerbeck
parent a774219a5c
commit ddae6f0289
1 changed files with 3 additions and 1 deletions

View File

@ -1026,7 +1026,9 @@ eet_list(Eet_File *ef, char *glob, int *count_ret)
/* check to see its' an eet file pointer */
if ((!ef) || (ef->magic != EET_MAGIC_FILE) || (!glob) ||
(!ef->header) || (!ef->header->directory))
(!ef->header) || (!ef->header->directory) ||
((ef->mode != EET_FILE_MODE_READ) &&
(ef->mode != EET_FILE_MODE_RW)))
{
if (count_ret) *count_ret = 0;
return NULL;