mirror of
https://github.com/vivier/EMILE.git
synced 2025-01-03 12:31:57 +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];
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user