aboutsummaryrefslogtreecommitdiffstats
path: root/archivers/torrentzip
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-05-27 04:40:29 +0800
committerpav <pav@FreeBSD.org>2005-05-27 04:40:29 +0800
commit1460a011316487870240bb8e5b24ca0aa360e1f8 (patch)
tree48a424a1baf3d75262b6b135776fa285e39d4999 /archivers/torrentzip
parent1c3992a0f5de676efb770cd4c0711dc601ae80b3 (diff)
downloadfreebsd-ports-gnome-1460a011316487870240bb8e5b24ca0aa360e1f8.tar.gz
freebsd-ports-gnome-1460a011316487870240bb8e5b24ca0aa360e1f8.tar.zst
freebsd-ports-gnome-1460a011316487870240bb8e5b24ca0aa360e1f8.zip
- Fix bug: Torrentzip uses the read permission flag to check if a zip file
needs to be processed. It does this by first setting all zip files to 0400, then as it processes the zip file it changes the permissions to 0200. PR: ports/81502 Submitted by: Scot W. Hetzel <swhetzel@gmail.com> (maintainer) Obtained from: author
Diffstat (limited to 'archivers/torrentzip')
-rw-r--r--archivers/torrentzip/Makefile1
-rw-r--r--archivers/torrentzip/files/patch-src-trrntzip.c32
2 files changed, 33 insertions, 0 deletions
diff --git a/archivers/torrentzip/Makefile b/archivers/torrentzip/Makefile
index 6587174a4d8f..8262f0ec7a29 100644
--- a/archivers/torrentzip/Makefile
+++ b/archivers/torrentzip/Makefile
@@ -7,6 +7,7 @@
PORTNAME= torrentzip
PORTVERSION= 0.2
+PORTREVISION= 1
CATEGORIES= archivers
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= trrntzip
diff --git a/archivers/torrentzip/files/patch-src-trrntzip.c b/archivers/torrentzip/files/patch-src-trrntzip.c
new file mode 100644
index 000000000000..e54c5b305054
--- /dev/null
+++ b/archivers/torrentzip/files/patch-src-trrntzip.c
@@ -0,0 +1,32 @@
+--- src/trrntzip.c-orig Mon May 2 08:38:40 2005
++++ src/trrntzip.c Sat May 7 02:51:55 2005
+@@ -716,7 +716,7 @@
+
+ if (dirp)
+ {
+- // First set all the files to read-only. This is so we can skip
++ // First set the sticky bit on all files. This is so we can skip
+ // our new zipfiles if they are returned by readdir() a second time.
+ while (direntp = readdir (dirp))
+ {
+@@ -732,7 +732,7 @@
+
+ if (strstr (szTmpBuf, ".zip\0"))
+ {
+- chmod (direntp->d_name, S_IRUSR);
++ chmod (direntp->d_name, istat.st_mode | S_ISTXT);
+ }
+ }
+ // Zip file is actually a dir
+@@ -780,9 +780,9 @@
+ sprintf (szTmpBuf, "%s", direntp->d_name);
+ strlwr (szTmpBuf);
+
+- if (strstr (szTmpBuf, ".zip\0") && !(istat.st_mode & S_IWUSR))
++ if (strstr (szTmpBuf, ".zip\0") && (istat.st_mode & S_ISTXT))
+ {
+- chmod (direntp->d_name, S_IWUSR);
++ chmod (direntp->d_name, istat.st_mode & ~S_ISTXT);
+ mig.cEncounteredZips++;
+
+ if (!mig.fProcessLog)