Skip to content

Commit 017a4cf

Browse files
committed
Small update
1 parent 5269828 commit 017a4cf

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

pyneofile/pyneofile.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8729,37 +8729,36 @@ def MultipleNeoFilesToArray(infile, fmttype="auto", filestart=0, seekstart=0, se
87298729

87308730

87318731
def TarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_dict__, seektoend=False, returnfp=False):
8732-
checkcompressfile = CheckCompressionSubType(infile, formatspecs, filestart, True)
8732+
checkcompressfile = __file_format_default__
87338733
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87348734
formatspecs = formatspecs[checkcompressfile]
87358735
fp = MkTempFile()
8736-
fp = PackNeoFileFromTarFile(infile, fp, "auto", True, None, compressionlistalt, "md5", [], formatspecs, None, False, True)
8736+
fp = PackNeoFileFromTarFile(infile, fp, "auto", "auto", True, None, compressionlistalt, ["md5", "md5", "md5", "md5", "md5"], [], {}, formatspecs, None, False, True)
87378737
listarrayfiles = NeoFileToArray(fp, "auto", 0, seekstart, seekend, listonly, contentasfile, True, skipchecksum, formatspecs, None, seektoend, returnfp)
87388738
return listarrayfiles
87398739

87408740

87418741
if(not libarchive_support):
87428742
def BSDTarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_dict__, seektoend=False, returnfp=False):
8743-
checkcompressfile = CheckCompressionSubType(infile, formatspecs, filestart, True):
87448743
return False
87458744

87468745
if(libarchive_support):
87478746
def BSDTarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_dict__, seektoend=False, returnfp=False):
8748-
checkcompressfile = CheckCompressionSubType(infile, formatspecs, filestart, True):
8747+
checkcompressfile = __file_format_default__
87498748
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87508749
formatspecs = formatspecs[checkcompressfile]
87518750
fp = MkTempFile()
8752-
fp = PackArchiveFileFromBSDTarFile(infile, fp, "auto", True, None, compressionlistalt, "md5", [], formatspecs, None, False, True)
8753-
listarrayfiles = ArchiveFileToArray(fp, "auto", 0, seekstart, seekend, listonly, contentasfile, True, skipchecksum, formatspecs, None, seektoend, returnfp)
8751+
fp = PackNeoFileFromBSDTarFile(infile, fp, "auto", "auto", True, None, compressionlistalt, ["md5", "md5", "md5", "md5", "md5"], [], {}, formatspecs, None, False, True)
8752+
listarrayfiles = NeoFileToArray(fp, "auto", 0, seekstart, seekend, listonly, contentasfile, True, skipchecksum, formatspecs, None, seektoend, returnfp)
87548753
return listarrayfiles
87558754

87568755

87578756
def ZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_dict__, seektoend=False, returnfp=False):
8758-
checkcompressfile = CheckCompressionSubType(infile, formatspecs, filestart, True)
8757+
checkcompressfile = __file_format_default__
87598758
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87608759
formatspecs = formatspecs[checkcompressfile]
87618760
fp = MkTempFile()
8762-
fp = PackNeoFileFromZipFile(infile, fp, "auto", True, None, compressionlistalt, "md5", [], formatspecs, None, False, True)
8761+
fp = PackNeoFileFromZipFile(infile, fp, "auto", "auto", True, None, compressionlistalt, ["md5", "md5", "md5", "md5", "md5"], [], {}, formatspecs, None, False, True)
87638762
listarrayfiles = NeoFileToArray(fp, "auto", 0, seekstart, seekend, listonly, contentasfile, True, skipchecksum, formatspecs, None, seektoend, returnfp)
87648763
return listarrayfiles
87658764

@@ -8770,11 +8769,11 @@ def RarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile
87708769

87718770
if(rarfile_support):
87728771
def RarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_dict__, seektoend=False, returnfp=False):
8773-
checkcompressfile = CheckCompressionSubType(infile, formatspecs, filestart, True)
8772+
checkcompressfile = __file_format_default__
87748773
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87758774
formatspecs = formatspecs[checkcompressfile]
87768775
fp = MkTempFile()
8777-
fp = PackNeoFileFromRarFile(infile, fp, "auto", True, None, compressionlistalt, "md5", [], formatspecs, None, False, True)
8776+
fp = PackNeoFileFromRarFile(infile, fp, "auto", "auto", True, None, compressionlistalt, ["md5", "md5", "md5", "md5", "md5"], [], {}, formatspecs, None, False, True)
87788777
listarrayfiles = NeoFileToArray(fp, "auto", 0, seekstart, seekend, listonly, contentasfile, True, skipchecksum, formatspecs, None, seektoend, returnfp)
87798778
return listarrayfiles
87808779

@@ -8784,11 +8783,11 @@ def SevenZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contenta
87848783

87858784
if(py7zr_support):
87868785
def SevenZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_dict__, seektoend=False, returnfp=False):
8787-
checkcompressfile = CheckCompressionSubType(infile, formatspecs, filestart, True)
8786+
checkcompressfile = __file_format_default__
87888787
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
87898788
formatspecs = formatspecs[checkcompressfile]
87908789
fp = MkTempFile()
8791-
fp = PackNeoFileFromSevenZipFile(infile, fp, "auto", True, None, compressionlistalt, "md5", [], formatspecs, None, False, True)
8790+
fp = PackNeoFileFromSevenZipFile(infile, fp, "auto", "auto", True, None, compressionlistalt, ["md5", "md5", "md5", "md5", "md5"], [], {}, formatspecs, None, False, True)
87928791
listarrayfiles = NeoFileToArray(fp, "auto", 0, seekstart, seekend, listonly, contentasfile, True, skipchecksum, formatspecs, None, seektoend, returnfp)
87938792
return listarrayfiles
87948793

@@ -9637,7 +9636,7 @@ def NeoFileListFiles(infile, fmttype="auto", filestart=0, seekstart=0, seekend=0
96379636
else:
96389637
if(infile != "-" and not hasattr(infile, "read") and not hasattr(infile, "write") and not isinstance(infile, bytes)):
96399638
infile = RemoveWindowsPath(infile)
9640-
listarrayfileslist = ArchiveFileToArray(infile, fmttype, filestart, seekstart, seekend, True, False, False, skipchecksum, formatspecs, saltkey, seektoend, returnfp)
9639+
listarrayfileslist = NeoFileToArray(infile, fmttype, filestart, seekstart, seekend, True, False, False, skipchecksum, formatspecs, saltkey, seektoend, returnfp)
96419640
if(not listarrayfileslist):
96429641
return False
96439642
for listarrayfiles in listarrayfileslist:

0 commit comments

Comments
 (0)