@@ -3298,11 +3298,16 @@ def ReadInMultipleFilesWithContentToArray(infile, fmttype="auto", filestart=0, s
32983298def ReadInStackedFileWithContentToArray (infile , fmttype = "auto" , filestart = 0 , seekstart = 0 , seekend = 0 , listonly = False , contentasfile = True , uncompress = True , skipchecksum = False , formatspecs = __file_format_multi_dict__ , seektoend = False ):
32993299 outretval = []
33003300 outstartfile = filestart
3301+ outfsize = float ('inf' )
33013302 while True :
3302- outarray = ReadInFileWithContentToArray (infile , fmttype , outstartfile , seekstart , seekend , listonly , contentasfile , uncompress , skipchecksum , formatspecs , seektoend )
3303+ if outstartfile >= outfsize : # stop when function signals False
3304+ break
3305+ outarray = ArchiveFileToArray (infile , fmttype , outstartfile , seekstart , seekend , listonly , contentasfile , uncompress , skipchecksum , formatspecs , seektoend , True )
3306+ outfsize = outarray ['fsize' ]
33033307 if outarray is False : # stop when function signals False
33043308 break
33053309 infile = outarray ['fp' ]
3310+ outstartfile = infile .tell ()
33063311 outretval .append (outarray )
33073312 return outretval
33083313
@@ -7561,11 +7566,16 @@ def MultipleCatFilesToArray(infile, fmttype="auto", filestart=0, seekstart=0, se
75617566def StackedCatFileToArray (infile , fmttype = "auto" , filestart = 0 , seekstart = 0 , seekend = 0 , listonly = False , contentasfile = True , uncompress = True , skipchecksum = False , formatspecs = __file_format_multi_dict__ , seektoend = False , returnfp = False ):
75627567 outretval = []
75637568 outstartfile = filestart
7569+ outfsize = float ('inf' )
75647570 while True :
7565- outarray = CatFileToArray (infile , fmttype , outstartfile , seekstart , seekend , listonly , contentasfile , uncompress , skipchecksum , formatspecs , seektoend , True )
7571+ if outstartfile >= outfsize : # stop when function signals False
7572+ break
7573+ outarray = ArchiveFileToArray (infile , fmttype , outstartfile , seekstart , seekend , listonly , contentasfile , uncompress , skipchecksum , formatspecs , seektoend , True )
7574+ outfsize = outarray ['fsize' ]
75667575 if outarray is False : # stop when function signals False
75677576 break
75687577 infile = outarray ['fp' ]
7578+ outstartfile = infile .tell ()
75697579 outretval .append (outarray )
75707580 return outretval
75717581
0 commit comments