Check if file exists and is not empty

This commit is contained in:
Laurent Vivier 2004-12-26 20:11:43 +00:00
parent ed025a24a8
commit a7092964e5

View File

@ -19,6 +19,14 @@ int emile_get_uncompressed_size(char *file)
int tube[2];
char buffer[1024];
char *uncompressed;
struct stat st;
ret = stat(file, &st);
if (ret == -1)
return -1;
if (st.st_size == 0)
return -1;
ret = pipe(tube);
if (ret == -1)