From f6be944a6ae612c70ce010582d9c3cdd72f7144f Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 13 Oct 1999 21:12:06 +0000 Subject: More stuff --- archival/tar.c | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'archival/tar.c') diff --git a/archival/tar.c b/archival/tar.c index ff60f0689..f222c3c9d 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -103,7 +103,6 @@ static ino_t tarInode; */ static void readTarFile (int fileCount, char **fileTable); static void readData (const char *cp, int count); -static void createPath (const char *name, int mode); static long getOctal (const char *cp, int len); static void readHeader (const TarHeader * hp, @@ -1022,36 +1021,6 @@ static void writeTarBlock (const char *buf, int len) } -/* - * Attempt to create the directories along the specified path, except for - * the final component. The mode is given for the final directory only, - * while all previous ones get default protections. Errors are not reported - * here, as failures to restore files can be reported later. - */ -static void createPath (const char *name, int mode) -{ - char *cp; - char *cpOld; - char buf[TAR_NAME_SIZE]; - - strcpy (buf, name); - - cp = strchr (buf, '/'); - - while (cp) { - cpOld = cp; - cp = strchr (cp + 1, '/'); - - *cpOld = '\0'; - - if (mkdir (buf, cp ? 0777 : mode) == 0) - printf ("Directory \"%s\" created\n", buf); - - *cpOld = '/'; - } -} - - /* * Read an octal value in a field of the specified width, with optional * spaces on both sides of the number and with an optional null character -- cgit v1.2.3