When ZipArchiver sets the Unix mode for files and directories in the archive, it only sets the permission part of the mode, and not the type part. This causes some problems:
- If you run zipinfo on such an archive, it shows the mode as ?rw-r--r-- - which is harmless, but confusing.
- Old versions of libarchive can't extract such files (see https://github.com/libarchive/libarchive/issues/441). There might be other extractors that have similar problems.
FIxing this should be simple enough - just OR the mode with S_IFREG (0100000) for files and S_IFDIR (0040000) for directories.