Skip to content

Commit db00ed0

Browse files
committed
Small update
1 parent 56ba52d commit db00ed0

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

pyfoxfile/pyfoxfile.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8734,8 +8734,8 @@ def MultipleFoxFilesToArray(infile, fmttype="auto", filestart=0, seekstart=0, se
87348734
return MultipleFoxFileToArray(infile, fmttype, filestart, seekstart, seekend, listonly, contentasfile, uncompress, skipchecksum, formatspecs, saltkey, seektoend, returnfp)
87358735

87368736

8737-
def TarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8738-
checkcompressfile = __file_format_default__
8737+
def TarFileToArray(infile, fmttype=__file_format_default__, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8738+
checkcompressfile = fmttype
87398739
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87408740
ckformatspecs = formatspecs[checkcompressfile]
87418741
fp = MkTempFile()
@@ -8745,12 +8745,12 @@ def TarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile
87458745

87468746

87478747
if(not libarchive_support):
8748-
def BSDTarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8748+
def BSDTarFileToArray(infile, fmttype=__file_format_default__, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
87498749
return False
87508750

87518751
if(libarchive_support):
8752-
def BSDTarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8753-
checkcompressfile = __file_format_default__
8752+
def BSDTarFileToArray(infile, fmttype=__file_format_default__, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8753+
checkcompressfile = fmttype
87548754
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87558755
ckformatspecs = formatspecs[checkcompressfile]
87568756
fp = MkTempFile()
@@ -8759,8 +8759,8 @@ def BSDTarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasf
87598759
return listarrayfiles
87608760

87618761

8762-
def ZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8763-
checkcompressfile = __file_format_default__
8762+
def ZipFileToArray(infile, fmttype=__file_format_default__, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8763+
checkcompressfile = fmttype
87648764
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87658765
ckformatspecs = formatspecs[checkcompressfile]
87668766
fp = MkTempFile()
@@ -8770,12 +8770,12 @@ def ZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile
87708770

87718771

87728772
if(not rarfile_support):
8773-
def RarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8773+
def RarFileToArray(infile, fmttype=__file_format_default__, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
87748774
return False
87758775

87768776
if(rarfile_support):
8777-
def RarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8778-
checkcompressfile = __file_format_default__
8777+
def RarFileToArray(infile, fmttype=__file_format_default__, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8778+
checkcompressfile = fmttype
87798779
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87808780
ckformatspecs = formatspecs[checkcompressfile]
87818781
fp = MkTempFile()
@@ -8784,12 +8784,12 @@ def RarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile
87848784
return listarrayfiles
87858785

87868786
if(not py7zr_support):
8787-
def SevenZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8787+
def SevenZipFileToArray(infile, fmttype=__file_format_default__, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
87888788
return False
87898789

87908790
if(py7zr_support):
8791-
def SevenZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8792-
checkcompressfile = __file_format_default__
8791+
def SevenZipFileToArray(infile, fmttype=__file_format_default__, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8792+
checkcompressfile = fmttype
87938793
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87948794
ckformatspecs = formatspecs[checkcompressfile]
87958795
fp = MkTempFile()
@@ -8798,22 +8798,22 @@ def SevenZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contenta
87988798
return listarrayfiles
87998799

88008800

8801-
def InFileToArray(infile, filestart=0, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, saltkey=None, seektoend=False, returnfp=False):
8801+
def InFileToArray(infile, fmttype=__file_format_default__, filestart=0, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, saltkey=None, seektoend=False, returnfp=False):
88028802
checkcompressfile = CheckCompressionSubType(infile, formatspecs, filestart, True)
88038803
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
8804-
formatspecs = formatspecs[checkcompressfile]
8804+
ckformatspecs = formatspecs[checkcompressfile]
88058805
if(checkcompressfile == "tarfile" and TarFileCheck(infile)):
8806-
return TarFileToArray(infile, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
8806+
return TarFileToArray(infile, fmttype, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
88078807
elif(checkcompressfile == "zipfile" and zipfile.is_zipfile(infile)):
8808-
return ZipFileToArray(infile, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
8808+
return ZipFileToArray(infile, fmttype, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
88098809
elif(rarfile_support and checkcompressfile == "rarfile" and (rarfile.is_rarfile(infile) or rarfile.is_rarfile_sfx(infile))):
8810-
return RarFileToArray(infile, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
8810+
return RarFileToArray(infile, fmttype, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
88118811
elif(py7zr_support and checkcompressfile == "7zipfile" and py7zr.is_7zfile(infile)):
8812-
return SevenZipFileToArray(infile, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
8813-
elif(checkcompressfile == formatspecs['format_magic']):
8812+
return SevenZipFileToArray(infile, fmttype, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
8813+
elif(checkcompressfile == ckformatspecs['format_magic']):
88148814
return FoxFileToArray(infile, "auto", filestart, seekstart, seekend, listonly, contentasfile, True, skipchecksum, formatspecs, saltkey, seektoend, returnfp)
88158815
else:
8816-
return False
8816+
return BSDTarFileToArray(infile, fmttype, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
88178817
return False
88188818

88198819

0 commit comments

Comments
 (0)