From e4b7f96093d4427a2cab602ac515d557b00cedd3 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 1 Feb 2001 16:14:47 +0000 Subject: Create intermediate directories PR: 24766 Submitted by: Roman Shterenzon --- archivers/unarj/Makefile | 1 + archivers/unarj/files/patch-ab | 55 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 archivers/unarj/files/patch-ab (limited to 'archivers') diff --git a/archivers/unarj/Makefile b/archivers/unarj/Makefile index 5897840..97e7c87 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 0000000..1442f03 --- /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 + #include + #include ++#include ++#include ++#include ++#include + #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)) + { -- cgit v1.1