Support zero byte sized pre 0.6 archives by setting the eof flag always.

This commit is contained in:
Con Kolivas 2011-05-07 23:36:55 +10:00
parent 55dc9b0095
commit aca5123d72

View file

@ -147,6 +147,8 @@ static void get_magic(rzip_control *control, char *magic)
expected_size = le64toh(expected_size); expected_size = le64toh(expected_size);
} }
control->st_size = expected_size; control->st_size = expected_size;
if (control->major_version == 0 && control->minor_version < 6)
control->eof = 1;
/* restore LZMA compression flags only if stored */ /* restore LZMA compression flags only if stored */
if ((int) magic[16]) { if ((int) magic[16]) {