diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-02-01 16:14:47 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-02-01 16:14:47 +0000 |
commit | 4c9b8c2d215a8bdf45f44b8a192c17440716e978 (patch) | |
tree | 4132603f9f1ec3686d0b67f3595fb273846734b8 /archivers/unarj | |
parent | Distfile chage, update on Dec 12, 2000. (diff) |
Create intermediate directories
PR: 24766
Submitted by: Roman Shterenzon <roman@xpert.com>
Notes
Notes:
svn path=/head/; revision=37885
Diffstat (limited to 'archivers/unarj')
-rw-r--r-- | archivers/unarj/Makefile | 1 | ||||
-rw-r--r-- | archivers/unarj/files/patch-ab | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/archivers/unarj/Makefile b/archivers/unarj/Makefile index 5897840ac127..97e7c87ae012 100644 --- a/archivers/unarj/Makefile +++ b/archivers/unarj/Makefile @@ -7,6 +7,7 @@ PORTNAME= unarj PORTVERSION= 2.43 +PORTREVISION= 1 CATEGORIES= archivers MASTER_SITES= ftp://ftp.kiarchive.ru/pub/unix/arcers/ EXTRACT_SUFX= .tgz diff --git a/archivers/unarj/files/patch-ab b/archivers/unarj/files/patch-ab new file mode 100644 index 000000000000..1442f03576c3 --- /dev/null +++ b/archivers/unarj/files/patch-ab @@ -0,0 +1,55 @@ +diff -urN unarj-2.43/unarj.c unarj-2.43.new/unarj.c +--- unarj.c.orig Mon Sep 29 14:00:24 1997 ++++ unarj.c Tue Aug 8 15:57:58 2000 +@@ -42,7 +42,8 @@ + * 02/17/93 R. Jung Added archive modified date support. + * 01/22/94 R. Jung Changed copyright message. + * 07/29/96 R. Jung Added "/" to list of path separators. +- * ++ * 08/08/00 P. Knirsch Added subdirectory creation for the x command. Also ++ * fixed some compiler warnings. + */ + + #include "unarj.h" +@@ -51,6 +52,10 @@ + #include <stdlib.h> + #include <string.h> + #include <ctype.h> ++#include <sys/stat.h> ++#include <sys/types.h> ++#include <fcntl.h> ++#include <unistd.h> + #else /* !MODERN */ + extern void free(); + extern void exit(); +@@ -712,6 +717,8 @@ + extract() + { + char name[FNAME_MAX]; ++ char dir[FNAME_MAX]; ++ char *pos; + + if (check_flags()) + { +@@ -730,6 +737,21 @@ + + if (host_os != OS) + default_case_path(name); ++ ++ ++ /* ++ 8/8/2000 Phil Knirsch: Bugfix to create subdirectories. Unarj didn't ++ do this for a long time, so it's finally fixed. ++ */ ++ pos = strchr(name, PATH_CHAR); ++ ++ while (pos != NULL) ++ { ++ strncpy(dir, name, pos-name); ++ dir[pos-name] = '\0'; ++ mkdir(dir, 0777); ++ pos = strchr(pos+1, PATH_CHAR); ++ } + + if (file_exists(name)) + { |