@@ -330,10 +330,15 @@ # we have to extend the range of our search, possibly until we # have a large part of the archive in memory. We can fail only # after the whole file has been searched. set sz [tell $fd] + if {[info exists ::zip::max_header_seek]} { + if {$::zip::max_header_seek < $sz} { + set sz $::zip::max_header_seek + } + } set len 512 set at 512 while {1} { if {$sz < $at} {set n -$sz} else {set n -$at}