From e857122c97b934a00252889a978db69d4e774df7 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Thu, 20 Nov 2003 10:47:06 +0000 Subject: Fix tar-handles-nested-exclude testcase --- archival/libunarchive/get_header_tar.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'archival/libunarchive') diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index 5354af8..d55189f 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c @@ -106,6 +106,14 @@ extern char get_header_tar(archive_handle_t *archive_handle) file_header->name = concat_path_file(tar.formated.prefix, tar.formated.name); } + { /* Strip trailing '/' in directories */ + char *tmp = last_char_is(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); -- cgit v1.1