]> granicus.if.org Git - python/commit
Define lots of constants for indexes into the structures for the file
authorFred Drake <fdrake@acm.org>
Wed, 28 Feb 2001 17:56:26 +0000 (17:56 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 28 Feb 2001 17:56:26 +0000 (17:56 +0000)
commit3e038e5e2551df9d37e1d44f7cc59cdce797f1a3
tree695626cd60c524a424b5cfe5e0c67c2794af4de5
parent62e2c7e3dfffd8465a54b99fc6d3c2a60acab350
Define lots of constants for indexes into the structures for the file
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.
Lib/zipfile.py