Skip to content

Commit 2a50867

Browse files
committed
Small update
1 parent 6c8ddaf commit 2a50867

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

pyneofile/pyneofile.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8728,8 +8728,8 @@ def MultipleNeoFilesToArray(infile, fmttype="auto", filestart=0, seekstart=0, se
87288728
return MultipleNeoFileToArray(infile, fmttype, filestart, seekstart, seekend, listonly, contentasfile, uncompress, skipchecksum, formatspecs, saltkey, seektoend, returnfp)
87298729

87308730

8731-
def TarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8732-
checkcompressfile = __file_format_default__
8731+
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):
8732+
checkcompressfile = fmttype
87338733
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87348734
ckformatspecs = formatspecs[checkcompressfile]
87358735
fp = MkTempFile()
@@ -8739,12 +8739,12 @@ def TarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile
87398739

87408740

87418741
if(not libarchive_support):
8742-
def BSDTarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8742+
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):
87438743
return False
87448744

87458745
if(libarchive_support):
8746-
def BSDTarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8747-
checkcompressfile = __file_format_default__
8746+
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):
8747+
checkcompressfile = fmttype
87488748
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87498749
ckformatspecs = formatspecs[checkcompressfile]
87508750
fp = MkTempFile()
@@ -8753,8 +8753,8 @@ def BSDTarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasf
87538753
return listarrayfiles
87548754

87558755

8756-
def ZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8757-
checkcompressfile = __file_format_default__
8756+
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):
8757+
checkcompressfile = fmttype
87588758
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87598759
ckformatspecs = formatspecs[checkcompressfile]
87608760
fp = MkTempFile()
@@ -8764,12 +8764,12 @@ def ZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile
87648764

87658765

87668766
if(not rarfile_support):
8767-
def RarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8767+
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):
87688768
return False
87698769

87708770
if(rarfile_support):
8771-
def RarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8772-
checkcompressfile = __file_format_default__
8771+
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):
8772+
checkcompressfile = fmttype
87738773
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87748774
ckformatspecs = formatspecs[checkcompressfile]
87758775
fp = MkTempFile()
@@ -8778,12 +8778,12 @@ def RarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile
87788778
return listarrayfiles
87798779

87808780
if(not py7zr_support):
8781-
def SevenZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8781+
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):
87828782
return False
87838783

87848784
if(py7zr_support):
8785-
def SevenZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_multi_dict__, seektoend=False, returnfp=False):
8786-
checkcompressfile = __file_format_default__
8785+
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):
8786+
checkcompressfile = fmttype
87878787
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87888788
ckformatspecs = formatspecs[checkcompressfile]
87898789
fp = MkTempFile()
@@ -8792,22 +8792,22 @@ def SevenZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contenta
87928792
return listarrayfiles
87938793

87948794

8795-
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):
8795+
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):
87968796
checkcompressfile = CheckCompressionSubType(infile, formatspecs, filestart, True)
87978797
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
8798-
formatspecs = formatspecs[checkcompressfile]
8798+
ckformatspecs = formatspecs[checkcompressfile]
87998799
if(checkcompressfile == "tarfile" and TarFileCheck(infile)):
8800-
return TarFileToArray(infile, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
8800+
return TarFileToArray(infile, fmttype, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
88018801
elif(checkcompressfile == "zipfile" and zipfile.is_zipfile(infile)):
8802-
return ZipFileToArray(infile, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
8802+
return ZipFileToArray(infile, fmttype, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
88038803
elif(rarfile_support and checkcompressfile == "rarfile" and (rarfile.is_rarfile(infile) or rarfile.is_rarfile_sfx(infile))):
8804-
return RarFileToArray(infile, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
8804+
return RarFileToArray(infile, fmttype, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
88058805
elif(py7zr_support and checkcompressfile == "7zipfile" and py7zr.is_7zfile(infile)):
8806-
return SevenZipFileToArray(infile, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
8807-
elif(checkcompressfile == formatspecs['format_magic']):
8806+
return SevenZipFileToArray(infile, fmttype, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
8807+
elif(checkcompressfile == ckformatspecs['format_magic']):
88088808
return NeoFileToArray(infile, "auto", filestart, seekstart, seekend, listonly, contentasfile, True, skipchecksum, formatspecs, saltkey, seektoend, returnfp)
88098809
else:
8810-
return False
8810+
return BSDTarFileToArray(infile, fmttype, seekstart, seekend, listonly, contentasfile, skipchecksum, formatspecs, seektoend, returnfp)
88118811
return False
88128812

88138813

0 commit comments

Comments
 (0)