mirror of
https://github.com/vivier/EMILE.git
synced 2024-10-10 16:23:42 +00:00
Check if file exists and is not empty
This commit is contained in:
parent
ed025a24a8
commit
a7092964e5
@ -19,6 +19,14 @@ int emile_get_uncompressed_size(char *file)
|
|||||||
int tube[2];
|
int tube[2];
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
char *uncompressed;
|
char *uncompressed;
|
||||||
|
struct stat st;
|
||||||
|
|
||||||
|
ret = stat(file, &st);
|
||||||
|
if (ret == -1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (st.st_size == 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
ret = pipe(tube);
|
ret = pipe(tube);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user