Diff

Differences From Artifact [8fe7ed4f05]:

To Artifact [9ed60c581d]:


   328    328       # comments the chunk may start at an arbitrary distance from the
   329    329       # end of the file. So if we do not find the header immediately
   330    330       # we have to extend the range of our search, possibly until we
   331    331       # have a large part of the archive in memory. We can fail only
   332    332       # after the whole file has been searched.
   333    333   
   334    334       set sz  [tell $fd]
          335  +    if {[info exists ::zip::max_header_seek]} {
          336  +        if {$::zip::max_header_seek < $sz} {
          337  +            set sz $::zip::max_header_seek
          338  +        }
          339  +    } 
   335    340       set len 512
   336    341       set at  512
   337    342       while {1} {
   338    343   	if {$sz < $at} {set n -$sz} else {set n -$at}
   339    344   
   340    345   	seek $fd $n end
   341    346   	set hdr [read $fd $len]