From ecf070148199c333dec01f28e4a7a05118162260 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 1 Nov 2020 10:24:22 +0200 Subject: [PATCH] - fixed zipdir inability to update empty zip file https://forum.zdoom.org/viewtopic.php?t=70468 --- tools/zipdir/zipdir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/zipdir/zipdir.c b/tools/zipdir/zipdir.c index 4cb98c1389..dab0dac048 100644 --- a/tools/zipdir/zipdir.c +++ b/tools/zipdir/zipdir.c @@ -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; } }