1 --- src
/trrntzip
.c
-orig Mon May
2 08:38:40 2005
2 +++ src
/trrntzip
.c Sat May
7 02:51:55 2005
7 - // First set all the files to read-only. This is so we can skip
8 + // First set the sticky bit on all files. This is so we can skip
9 // our new zipfiles if they are returned by readdir() a second time.
10 while (direntp
= readdir (dirp
))
14 if (strstr (szTmpBuf
, ".zip\0"))
16 - chmod (direntp
->d_name
, S_IRUSR
);
17 + chmod (direntp
->d_name
, istat
.st_mode
| S_ISVTX
);
20 // Zip file is actually a dir
22 sprintf (szTmpBuf
, "%s", direntp
->d_name
);
25 - if (strstr (szTmpBuf
, ".zip\0") && !(istat
.st_mode
& S_IWUSR
))
26 + if (strstr (szTmpBuf
, ".zip\0") && (istat
.st_mode
& S_ISVTX
))
28 - chmod (direntp
->d_name
, S_IWUSR
);
29 + chmod (direntp
->d_name
, istat
.st_mode
& ~S_ISVTX
);
30 mig
.cEncounteredZips
++;