@@ -3297,11 +3297,16 @@ def ReadInMultipleFilesWithContentToArray(infile, fmttype="auto", filestart=0, s
32973297def 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 ):
32983298 outretval = []
32993299 outstartfile = filestart
3300+ outfsize = float ('inf' )
33003301 while True :
3301- outarray = ReadInFileWithContentToArray (infile , fmttype , outstartfile , seekstart , seekend , listonly , contentasfile , uncompress , skipchecksum , formatspecs , seektoend )
3302+ if outstartfile >= outfsize : # stop when function signals False
3303+ break
3304+ outarray = ArchiveFileToArray (infile , fmttype , outstartfile , seekstart , seekend , listonly , contentasfile , uncompress , skipchecksum , formatspecs , seektoend , True )
3305+ outfsize = outarray ['fsize' ]
33023306 if outarray is False : # stop when function signals False
33033307 break
33043308 infile = outarray ['fp' ]
3309+ outstartfile = infile .tell ()
33053310 outretval .append (outarray )
33063311 return outretval
33073312
@@ -7560,11 +7565,16 @@ def MultipleFoxFilesToArray(infile, fmttype="auto", filestart=0, seekstart=0, se
75607565def StackedFoxFileToArray (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 ):
75617566 outretval = []
75627567 outstartfile = filestart
7568+ outfsize = float ('inf' )
75637569 while True :
7564- outarray = FoxFileToArray (infile , fmttype , outstartfile , seekstart , seekend , listonly , contentasfile , uncompress , skipchecksum , formatspecs , seektoend , True )
7570+ if outstartfile >= outfsize : # stop when function signals False
7571+ break
7572+ outarray = ArchiveFileToArray (infile , fmttype , outstartfile , seekstart , seekend , listonly , contentasfile , uncompress , skipchecksum , formatspecs , seektoend , True )
7573+ outfsize = outarray ['fsize' ]
75657574 if outarray is False : # stop when function signals False
75667575 break
75677576 infile = outarray ['fp' ]
7577+ outstartfile = infile .tell ()
75687578 outretval .append (outarray )
75697579 return outretval
75707580
0 commit comments