Skip to content

Commit 5e66b7c

Browse files
committed
Small update
1 parent 56b8767 commit 5e66b7c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

pyfoxfile/pyfoxfile.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6194,6 +6194,8 @@ def AppendFilesWithContentToList(infiles, dirlistfromtxt=False, extradata=[], js
61946194
if not followlink and ftype in data_types:
61956195
with open(fname, "rb") as fpc:
61966196
shutil.copyfileobj(fpc, fcontents, length=__filebuff_size__)
6197+
if(fsize is not fcontents.tell()):
6198+
fsize = format(int(fcontents.tell()), 'x').lower()
61976199
typechecktest = CheckCompressionType(fcontents, filestart=0, closefp=False)
61986200
fcontents.seek(0, 0)
61996201
if(typechecktest is not False):
@@ -6473,6 +6475,8 @@ def AppendFilesWithContentFromTarFileToList(infile, extradata=[], jsondata={}, c
64736475
if ftype in data_types:
64746476
fpc = tarfp.extractfile(member)
64756477
shutil.copyfileobj(fpc, fcontents, length=__filebuff_size__)
6478+
if(fsize is not fcontents.tell()):
6479+
fsize = format(int(fcontents.tell()), 'x').lower()
64766480
fpc.close()
64776481
typechecktest = CheckCompressionType(fcontents, filestart=0, closefp=False)
64786482
fcontents.seek(0, 0)
@@ -6742,6 +6746,8 @@ def AppendFilesWithContentFromBSDTarFileToList(infile, extradata=[], jsondata={}
67426746
sparse_types = {12}
67436747
if ftype in zero_length_types:
67446748
fsize = format(int("0"), 'x').lower()
6749+
elif member.size is None:
6750+
fsize = format(int("0"), 'x').lower()
67456751
elif ftype in data_types:
67466752
fsize = format(int(member.size), 'x').lower()
67476753
else:
@@ -6785,6 +6791,8 @@ def AppendFilesWithContentFromBSDTarFileToList(infile, extradata=[], jsondata={}
67856791
fcontents.write(member.read())
67866792
else:
67876793
pass
6794+
if(fsize is not fcontents.tell()):
6795+
fsize = format(int(fcontents.tell()), 'x').lower()
67886796
typechecktest = CheckCompressionType(fcontents, filestart=0, closefp=False)
67896797
fcontents.seek(0, 0)
67906798
if(typechecktest is not False):
@@ -7031,6 +7039,8 @@ def AppendFilesWithContentFromZipFileToList(infile, extradata=[], jsondata={}, c
70317039
curcompression = "none"
70327040
if ftype == 0:
70337041
fcontents.write(zipfp.read(member.filename))
7042+
if(fsize is not fcontents.tell()):
7043+
fsize = format(int(fcontents.tell()), 'x').lower()
70347044
typechecktest = CheckCompressionType(fcontents, filestart=0, closefp=False)
70357045
fcontents.seek(0, 0)
70367046
if(typechecktest is not False):
@@ -7267,6 +7277,8 @@ def AppendFilesWithContentFromRarFileToList(infile, extradata=[], jsondata={}, c
72677277
curcompression = "none"
72687278
if ftype == 0:
72697279
fcontents.write(rarfp.read(member.filename))
7280+
if(fsize is not fcontents.tell()):
7281+
fsize = format(int(fcontents.tell()), 'x').lower()
72707282
typechecktest = CheckCompressionType(fcontents, filestart=0, closefp=False)
72717283
fcontents.seek(0, 0)
72727284
if(typechecktest is not False):

0 commit comments

Comments
 (0)