@@ -6187,6 +6187,8 @@ def AppendFilesWithContentToList(infiles, dirlistfromtxt=False, extradata=[], js
61876187 if not followlink and ftype in data_types :
61886188 with open (fname , "rb" ) as fpc :
61896189 shutil .copyfileobj (fpc , fcontents , length = __filebuff_size__ )
6190+ if (fsize is not fcontents .tell ()):
6191+ fsize = format (int (fcontents .tell ()), 'x' ).lower ()
61906192 typechecktest = CheckCompressionType (fcontents , filestart = 0 , closefp = False )
61916193 fcontents .seek (0 , 0 )
61926194 if (typechecktest is not False ):
@@ -6466,6 +6468,8 @@ def AppendFilesWithContentFromTarFileToList(infile, extradata=[], jsondata={}, c
64666468 if ftype in data_types :
64676469 fpc = tarfp .extractfile (member )
64686470 shutil .copyfileobj (fpc , fcontents , length = __filebuff_size__ )
6471+ if (fsize is not fcontents .tell ()):
6472+ fsize = format (int (fcontents .tell ()), 'x' ).lower ()
64696473 fpc .close ()
64706474 typechecktest = CheckCompressionType (fcontents , filestart = 0 , closefp = False )
64716475 fcontents .seek (0 , 0 )
@@ -6735,6 +6739,8 @@ def AppendFilesWithContentFromBSDTarFileToList(infile, extradata=[], jsondata={}
67356739 sparse_types = {12 }
67366740 if ftype in zero_length_types :
67376741 fsize = format (int ("0" ), 'x' ).lower ()
6742+ elif member .size is None :
6743+ fsize = format (int ("0" ), 'x' ).lower ()
67386744 elif ftype in data_types :
67396745 fsize = format (int (member .size ), 'x' ).lower ()
67406746 else :
@@ -6778,6 +6784,8 @@ def AppendFilesWithContentFromBSDTarFileToList(infile, extradata=[], jsondata={}
67786784 fcontents .write (member .read ())
67796785 else :
67806786 pass
6787+ if (fsize is not fcontents .tell ()):
6788+ fsize = format (int (fcontents .tell ()), 'x' ).lower ()
67816789 typechecktest = CheckCompressionType (fcontents , filestart = 0 , closefp = False )
67826790 fcontents .seek (0 , 0 )
67836791 if (typechecktest is not False ):
@@ -7024,6 +7032,8 @@ def AppendFilesWithContentFromZipFileToList(infile, extradata=[], jsondata={}, c
70247032 curcompression = "none"
70257033 if ftype == 0 :
70267034 fcontents .write (zipfp .read (member .filename ))
7035+ if (fsize is not fcontents .tell ()):
7036+ fsize = format (int (fcontents .tell ()), 'x' ).lower ()
70277037 typechecktest = CheckCompressionType (fcontents , filestart = 0 , closefp = False )
70287038 fcontents .seek (0 , 0 )
70297039 if (typechecktest is not False ):
@@ -7260,6 +7270,8 @@ def AppendFilesWithContentFromRarFileToList(infile, extradata=[], jsondata={}, c
72607270 curcompression = "none"
72617271 if ftype == 0 :
72627272 fcontents .write (rarfp .read (member .filename ))
7273+ if (fsize is not fcontents .tell ()):
7274+ fsize = format (int (fcontents .tell ()), 'x' ).lower ()
72637275 typechecktest = CheckCompressionType (fcontents , filestart = 0 , closefp = False )
72647276 fcontents .seek (0 , 0 )
72657277 if (typechecktest is not False ):
0 commit comments