|
Added
Link Here
|
| 1 |
--- unix/unix.c.orig Sat Feb 26 16:43:42 2005 |
| 2 |
+++ unix/unix.c Fri Sep 9 14:36:35 2005 |
| 3 |
@@ -1042,6 +1042,16 @@ |
| 4 |
ush z_uidgid[2]; |
| 5 |
int have_uidgid_flg; |
| 6 |
|
| 7 |
+/*--------------------------------------------------------------------------- |
| 8 |
+ Change the file permissions from default ones to those stored in the |
| 9 |
+ zipfile. |
| 10 |
+ ---------------------------------------------------------------------------*/ |
| 11 |
+ |
| 12 |
+#ifndef NO_CHMOD |
| 13 |
+ if (fchmod(fileno(G.outfile), 0xffff & G.pInfo->file_attr)) |
| 14 |
+ perror("chmod (file attributes) error"); |
| 15 |
+#endif |
| 16 |
+ |
| 17 |
fclose(G.outfile); |
| 18 |
|
| 19 |
/*--------------------------------------------------------------------------- |
| 20 |
@@ -1150,16 +1160,6 @@ |
| 21 |
" (warning) cannot set times")); |
| 22 |
#endif /* ?AOS_VS */ |
| 23 |
} |
| 24 |
- |
| 25 |
-/*--------------------------------------------------------------------------- |
| 26 |
- Change the file permissions from default ones to those stored in the |
| 27 |
- zipfile. |
| 28 |
- ---------------------------------------------------------------------------*/ |
| 29 |
- |
| 30 |
-#ifndef NO_CHMOD |
| 31 |
- if (chmod(G.filename, filtattr(__G__ G.pInfo->file_attr))) |
| 32 |
- perror("chmod (file attributes) error"); |
| 33 |
-#endif |
| 34 |
|
| 35 |
} /* end function close_outfile() */ |
| 36 |
|