- fixed zipdir inability to update empty zip file

https://forum.zdoom.org/viewtopic.php?t=70468
This commit is contained in:
alexey.lysiuk 2020-11-01 10:24:22 +02:00
parent ff9a56dc0b
commit ecf0701481

View file

@ -781,6 +781,8 @@ void write_zip(const char *zipname, dir_tree_t *trees, int update)
if (central_dir == NULL)
{
fprintf(stderr, "Could not read central directory from %s. (Is it a zipfile?)\n", zipname);
fclose(ozip);
ozip = NULL;
update = 0;
}
}