From owner-svn-src-all@FreeBSD.ORG Fri Sep 2 13:03:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33A07106566B; Fri, 2 Sep 2011 13:03:57 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A81F8FC18; Fri, 2 Sep 2011 13:03:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p82D3ujS099649; Fri, 2 Sep 2011 13:03:56 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p82D3uBJ099647; Fri, 2 Sep 2011 13:03:56 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201109021303.p82D3uBJ099647@svn.freebsd.org> From: Martin Matuska Date: Fri, 2 Sep 2011 13:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225329 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 13:03:57 -0000 Author: mm Date: Fri Sep 2 13:03:56 2011 New Revision: 225329 URL: http://svn.freebsd.org/changeset/base/225329 Log: Import additional bugfix for reading and extracting makefs-created ISO images with tar. Vendor revision 3648 (merge of 3647): Additional fix to issue 168 because the change of r3642 was not sufficient. - Make sure "CL" entry appear after its "RE" entry which the "CL" entry should be connected with. - Give consideration to the case that the top level "RE" entry has already been exposed outside before its tree. Approved by: re (kib) Obtained from: libarchive (release/2.8, svn rev 3648) MFC after: 3 days Modified: head/lib/libarchive/archive_read_support_format_iso9660.c Modified: head/lib/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- head/lib/libarchive/archive_read_support_format_iso9660.c Fri Sep 2 09:55:35 2011 (r225328) +++ head/lib/libarchive/archive_read_support_format_iso9660.c Fri Sep 2 13:03:56 2011 (r225329) @@ -1815,8 +1815,11 @@ parse_file_info(struct archive_read *a, file->re_descendant = 1; if (file->cl_offset != 0) { parent->subdirs++; - /* To be appeared before other dirs. */ - file->offset = file->number = file->cl_offset; + /* Overwrite an offset and a number of this "CL" entry + * to appear before other dirs. "+1" to those is to + * make sure to appear after "RE" entry which this + * "CL" entry should be connected with. */ + file->offset = file->number = file->cl_offset + 1; } } @@ -2581,13 +2584,16 @@ next_cache_entry(struct archive_read *a, continue; } else if (file->re_descendant) { /* - * Do not expose this at this time - * because we have not gotten its full-path - * name yet. + * If the top level "RE" entry of this entry + * is not exposed, we, accordingly, should not + * expose this entry at this time because + * we cannot make its proper full-path name. */ - if (rede_add_entry(file) < 0) - goto fatal_rr; - continue; + if (rede_add_entry(file) == 0) + continue; + /* Otherwise we can expose this entry because + * it seems its top level "RE" has already been + * exposed. */ } } break;