updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / trrntzip / patch-src-trrntzip.c
bloba46c2781becce14b5b3cb23280e840c06edbe9b5
1 --- src/trrntzip.c-orig Mon May 2 08:38:40 2005
2 +++ src/trrntzip.c Sat May 7 02:51:55 2005
3 @@ -716,7 +716,7 @@
5 if (dirp)
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))
12 @@ -732,7 +732,7 @@
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
21 @@ -780,9 +780,9 @@
22 sprintf (szTmpBuf, "%s", direntp->d_name);
23 strlwr (szTmpBuf);
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++;
32 if (!mig.fProcessLog)