summaryrefslogtreecommitdiff
path: root/archival/libunarchive/get_header_tar.c
diff options
context:
space:
mode:
authorGlenn L McGrath2002-10-19 06:19:22 +0000
committerGlenn L McGrath2002-10-19 06:19:22 +0000
commitc5c1a8a112ebae29862a902e6e511b392c59da74 (patch)
tree88df433818b25262966b84fa81aecde8b75c8ed1 /archival/libunarchive/get_header_tar.c
parent05fa661123d90b990c146ef6d79da82d798ccd6f (diff)
downloadbusybox-c5c1a8a112ebae29862a902e6e511b392c59da74.zip
busybox-c5c1a8a112ebae29862a902e6e511b392c59da74.tar.gz
Fix exclude/include problem
Diffstat (limited to 'archival/libunarchive/get_header_tar.c')
-rw-r--r--archival/libunarchive/get_header_tar.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index bb0affe..e87eb77 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -47,6 +47,7 @@ extern char get_header_tar(archive_handle_t *archive_handle)
} tar;
long sum = 0;
long i;
+ char *tmp;
/* Align header */
archive_handle->offset += data_align(archive_handle->src_fd, archive_handle->offset, 512);
@@ -91,6 +92,11 @@ extern char get_header_tar(archive_handle_t *archive_handle)
} else {
file_header->name = concat_path_file(tar.formated.prefix, tar.formated.name);
}
+ tmp = last_char_is(archive_handle->file_header->name, '/');
+ if (tmp) {
+ *tmp = '\0';
+ }
+
file_header->mode = strtol(tar.formated.mode, NULL, 8);
file_header->uid = strtol(tar.formated.uid, NULL, 8);
file_header->gid = strtol(tar.formated.gid, NULL, 8);
@@ -159,6 +165,7 @@ extern char get_header_tar(archive_handle_t *archive_handle)
archive_handle->action_header(archive_handle->file_header);
archive_handle->flags |= ARCHIVE_EXTRACT_QUIET;
archive_handle->action_data(archive_handle);
+ archive_handle->passed = add_to_list(archive_handle->passed, archive_handle->file_header->name);
} else {
data_skip(archive_handle);
}