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).