1From af50c278c5b2c57a76771825a80ca3ff9d315acd Mon Sep 17 00:00:00 2001
2From: "Steven M. Schweda" <sms@antinode.info>
3Date: Sat, 15 Jun 2019 18:13:11 -0700
4Subject: [PATCH] Handle the PKWare verification bit of internal attributes
5
6---
7 process.c | 7 +++++++
8 1 file changed, 7 insertions(+)
9
10diff --git a/process.c b/process.c
11index 1e9a1e1..ed314e1 100644
12--- a/process.c
13+++ b/process.c
14@@ -1729,6 +1729,13 @@ int process_cdir_file_hdr(__G) /* return PK-type error code */
15 else if (uO.L_flag > 1) /* let -LL force lower case for all names */
16 G.pInfo->lcflag = 1;
17
18+ /* Handle the PKWare verification bit, bit 2 (0x0004) of internal
19+ attributes. If this is set, then a verification checksum is in the
20+ first 3 bytes of the external attributes. In this case all we can use
21+ for setting file attributes is the last external attributes byte. */
22+ if (G.crec.internal_file_attributes & 0x0004)
23+ G.crec.external_file_attributes &= (ulg)0xff;
24+
25 /* do Amigas (AMIGA_) also have volume labels? */
26 if (IS_VOLID(G.crec.external_file_attributes) &&
27 (G.pInfo->hostnum == FS_FAT_ || G.pInfo->hostnum == FS_HPFS_ ||
28--
292.20.1
30