--- unzip-5.52/unix/unix.c.can-2005-2475 2005-02-26 12:43:42.000000000 -0700 +++ unzip-5.52/unix/unix.c 2005-10-20 12:30:07.000000000 -0600 @@ -1042,6 +1042,16 @@ ush z_uidgid[2]; int have_uidgid_flg; +/*--------------------------------------------------------------------------- + Change the file permissions from default ones to those stored in the + zipfile. + ---------------------------------------------------------------------------*/ + +#ifndef NO_CHMOD + if (fchmod(fileno(G.outfile), filtattr(__G__ G.pInfo->file_attr))) + perror("chmod (file attributes) error"); +#endif + fclose(G.outfile); /*--------------------------------------------------------------------------- @@ -1151,16 +1161,6 @@ #endif /* ?AOS_VS */ } -/*--------------------------------------------------------------------------- - Change the file permissions from default ones to those stored in the - zipfile. - ---------------------------------------------------------------------------*/ - -#ifndef NO_CHMOD - if (chmod(G.filename, filtattr(__G__ G.pInfo->file_attr))) - perror("chmod (file attributes) error"); -#endif - } /* end function close_outfile() */ #endif /* !MTS */