~ubuntu-branches/ubuntu/quantal/unzip/quantal-proposed

« back to all changes in this revision

Viewing changes to debian/patches/04-handle-pkware-verification-bit

  • Committer: Package Import Robot
  • Author(s): Logan Rosen
  • Date: 2012-08-05 21:31:45 UTC
  • mfrom: (2.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20120805213145-yjn97p3843amjk91
Tags: 6.0-7ubuntu1
* Merge from Debian unstable. Remaining change:
  - Added patch from archlinux which adds the -O option allowing a charset
  to be specified for the proper unzipping of non-latin and non-unicode
  filenames.
* Merge adds Multi-Arch: foreign. (LP: #1010450)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Steven Schweda
 
2
Subject: Handle the PKWare verification bit of internal attributes
 
3
Bug-Debian: http://bugs.debian.org/630078
 
4
X-Debian-version: 6.0-5
 
5
 
 
6
--- a/process.c
 
7
+++ b/process.c
 
8
@@ -1729,6 +1729,13 @@
 
9
     else if (uO.L_flag > 1)   /* let -LL force lower case for all names */
 
10
         G.pInfo->lcflag = 1;
 
11
 
 
12
+    /* Handle the PKWare verification bit, bit 2 (0x0004) of internal
 
13
+       attributes.  If this is set, then a verification checksum is in the
 
14
+       first 3 bytes of the external attributes.  In this case all we can use
 
15
+       for setting file attributes is the last external attributes byte. */
 
16
+    if (G.crec.internal_file_attributes & 0x0004)
 
17
+      G.crec.external_file_attributes &= (ulg)0xff;
 
18
+
 
19
     /* do Amigas (AMIGA_) also have volume labels? */
 
20
     if (IS_VOLID(G.crec.external_file_attributes) &&
 
21
         (G.pInfo->hostnum == FS_FAT_ || G.pInfo->hostnum == FS_HPFS_ ||