diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-07-10 18:10:20 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-07-10 18:10:20 +0000 |
commit | 34cc13118c97349cbd07f8e2dc4ed5e59112cb9c (patch) | |
tree | c53740f7ff88cc8785e5d11986d8a7a8588bddd2 | |
parent | 81854db17fe676886a8e9286634d35026ba9c7aa (diff) | |
download | FreeBSD-src-34cc13118c97349cbd07f8e2dc4ed5e59112cb9c.zip FreeBSD-src-34cc13118c97349cbd07f8e2dc4ed5e59112cb9c.tar.gz |
Correct a brain-o in extract_dir: mkdirpath() and mkdir(2) are
not interchangable.
-rw-r--r-- | lib/libarchive/archive_read_extract.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libarchive/archive_read_extract.c b/lib/libarchive/archive_read_extract.c index 9ed6aab..50bce50 100644 --- a/lib/libarchive/archive_read_extract.c +++ b/lib/libarchive/archive_read_extract.c @@ -477,13 +477,15 @@ extract_dir(struct archive *a, struct archive_entry *entry, int flags) unlink(path); } else { /* Doesn't already exist; try building the parent path. */ - if (mkdirpath(a, p, flags) != ARCHIVE_OK) + if (mkdirpath_internal(a, path, flags) != ARCHIVE_OK) return (ARCHIVE_WARN); } /* One final attempt to create the dir. */ - if (mkdirpath_internal(a, path, flags) != ARCHIVE_OK) + if (mkdir(path, SECURE_DIR_MODE) != 0) { + archive_set_error(a, errno, "Can't create directory"); return (ARCHIVE_WARN); + } success: /* Add this dir to the fixup list. */ |