diff options
Diffstat (limited to 'libgo/go/archive/zip/struct.go')
-rw-r--r-- | libgo/go/archive/zip/struct.go | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/libgo/go/archive/zip/struct.go b/libgo/go/archive/zip/struct.go index 35dcec6468b..55f3dcfb82e 100644 --- a/libgo/go/archive/zip/struct.go +++ b/libgo/go/archive/zip/struct.go @@ -27,10 +27,11 @@ const ( fileHeaderSignature = 0x04034b50 directoryHeaderSignature = 0x02014b50 directoryEndSignature = 0x06054b50 - fileHeaderLen = 30 // + filename + extra - directoryHeaderLen = 46 // + filename + extra + comment - directoryEndLen = 22 // + comment - dataDescriptorLen = 12 + dataDescriptorSignature = 0x08074b50 // de-facto standard; required by OS X Finder + fileHeaderLen = 30 // + filename + extra + directoryHeaderLen = 46 // + filename + extra + comment + directoryEndLen = 22 // + comment + dataDescriptorLen = 16 // four uint32: descriptor signature, crc32, compressed size, size // Constants for the first byte in CreatorVersion creatorFAT = 0 @@ -100,16 +101,6 @@ type directoryEnd struct { comment string } -func recoverError(errp *error) { - if e := recover(); e != nil { - if err, ok := e.(error); ok { - *errp = err - return - } - panic(e) - } -} - // msDosTimeToTime converts an MS-DOS date and time into a time.Time. // The resolution is 2s. // See: http://msdn.microsoft.com/en-us/library/ms724247(v=VS.85).aspx |