aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-06-21 19:41:37 +0000
committerMatt Kraai <kraai@debian.org>2001-06-21 19:41:37 +0000
commitceeff7381929930fe8d7e33543e285d5fdcf1c68 (patch)
tree3cdbaddffecc92649215fdc71a43b4e8e86b7ea3 /archival
parent091781e20eb055ac286b5a617d53a50c7d6c451e (diff)
downloadbusybox-ceeff7381929930fe8d7e33543e285d5fdcf1c68.tar.gz
Rewrote mkdir (and touched lots of things in the process).
Diffstat (limited to 'archival')
-rw-r--r--archival/dpkg.c2
-rw-r--r--archival/tar.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 4224672ec..7dd46be0c 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -837,7 +837,7 @@ extern int dpkg_main(int argc, char **argv)
optind++;
}
- create_path(infodir, S_IRWXU);
+ make_directory(infodir, S_IRWXU, FILEUTILS_RECUR);
status = status_read();
diff --git a/archival/tar.c b/archival/tar.c
index 55fb12c2c..e68194ff7 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -338,7 +338,9 @@ tarExtractRegularFile(TarInfo *header, int extractFlag, int tostdoutFlag)
if (extractFlag==TRUE && tostdoutFlag==FALSE) {
/* Create the path to the file, just in case it isn't there...
* This should not screw up path permissions or anything. */
- create_path(header->name, 0777);
+ char *dir = dirname (header->name);
+ make_directory (dir, -1, FILEUTILS_RECUR);
+ free (dir);
if ((outFd=open(header->name, O_CREAT|O_TRUNC|O_WRONLY,
header->mode & ~S_IFMT)) < 0) {
error_msg(io_error, header->name, strerror(errno));
@@ -397,8 +399,7 @@ tarExtractDirectory(TarInfo *header, int extractFlag, int tostdoutFlag)
if (extractFlag==FALSE || tostdoutFlag==TRUE)
return( TRUE);
- if (create_path(header->name, header->mode) != TRUE) {
- perror_msg("%s: Cannot mkdir", header->name);
+ if (make_directory(header->name, header->mode, FILEUTILS_RECUR) < 0) {
return( FALSE);
}
/* make the final component, just in case it was