• Fred Drake's avatar
    Define lots of constants for indexes into the structures for the file · 3e038e5e
    Fred Drake yazdı
    header and central directory structures, and use them as appropriate.
    The point being to make it easier to tell what is getting pulled out
    where; magic numbers are evil!
    
    Change the computation of the ZipInfo.file_offset field to use the
    length of the relevant "extra" field -- there are two different ones,
    and the wrong one had been used.  ;-(
    
    This closes SF tracker patch #403276, but more verbosely than the
    proposed patch.
    3e038e5e
zipfile.py 22 KB