]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Issue #822: Try harder to detect directories in zip archives 850/head
authorPeter Wu <peter@lekensteyn.nl>
Fri, 23 Dec 2016 11:45:43 +0000 (12:45 +0100)
committerPeter Wu <peter@lekensteyn.nl>
Fri, 23 Dec 2016 13:39:56 +0000 (14:39 +0100)
commit2ecf8d1c1e1bdfc20b0aada90e356054a3054693
treefa40e029181b87a006164425a61614fe0f6d1f75
parent32959ebca2fb611f98062e5634793eefac34e3c5
Issue #822: Try harder to detect directories in zip archives

Assume that anything with a trailing slash is a directory. This avoids
creating regular files when a directory is expected and could occur
when the External File Attributes (EFA) field in the Central Directory
contains bogus values:

 - Jar file: observed to have OS MS-DOS (0) and EFA 0.
 - dex2jar-2.0.zip: observed to have OS Unix (3), but EFA 0xffff0010.
   After this patch, bsdtar tv still shows mode drwsrwsrwt, but at least
   it successfully creates a directory instead of a regular file.

A test case has been added for the first case (based on
test_read_format_zip_nofiletype).
Makefile.am
libarchive/archive_read_support_format_zip.c
libarchive/test/CMakeLists.txt
libarchive/test/test_read_format_zip_jar.c [new file with mode: 0644]
libarchive/test/test_read_format_zip_jar.jar.uu [new file with mode: 0644]