Mail Archives: djgpp-workers/2000/12/08/11:50:02
If djtar is invoked as:
djtar -x *.zip
it will unzip the first zip file it founds and
for all others it will issue the error message:
foo.zip: invalid zip file structure
Except for the first zip file, djtar is not able to unzip them.
Please note that there must be really **more** than one zip file
in the cwd for this bug to be triggered.
The reason is that the counters and buffers that are used, are not
reinitialized to zero as they should. This has not been noticed
because all this variables are global, so they are intialized to zero
at program start but later they retain their old *and* wrong values
makeing the second and later calls of epunzip_read() fail.
The patch below will fix this bug. This patch will *not* interfere
with the bzip-support patch.
Regards,
Guerrero, Juan Manuel.
diff -acprNC5 djgpp.orig/src/utils/djtar/epunzip.c djgpp/src/utils/djtar/epunzip.c
*** djgpp.orig/src/utils/djtar/epunzip.c Tue Nov 28 21:04:06 2000
--- djgpp/src/utils/djtar/epunzip.c Fri Dec 8 17:21:50 2000
*************** static char *changed_name = NULL;
*** 33,42 ****
--- 33,43 ----
int epcopy(char *, long);
void
epunzip_read(char *zipfilename)
{
+ clear_bufs();
errno = 0;
ifd = oread_open(zipfilename);
if(errno)
{
fprintf(log_out, "%s: %s\n", zipfilename, strerror(errno));
- Raw text -