Skip to content

Commit a502819

Browse files
committed
Small update
1 parent 55f5161 commit a502819

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

pyarchivefile/pyarchivefile.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8739,6 +8739,16 @@ def TarFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile
87398739
return listarrayfiles
87408740

87418741

8742+
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)
8744+
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
8745+
formatspecs = formatspecs[checkcompressfile]
8746+
fp = MkTempFile()
8747+
fp = PackArchiveFileFromBSDTarFile(infile, fp, "auto", True, None, compressionlistalt, "md5", [], formatspecs, None, False, True)
8748+
listarrayfiles = ArchiveFileToArray(fp, "auto", 0, seekstart, seekend, listonly, contentasfile, True, skipchecksum, formatspecs, None, seektoend, returnfp)
8749+
return listarrayfiles
8750+
8751+
87428752
def ZipFileToArray(infile, seekstart=0, seekend=0, listonly=False, contentasfile=True, skipchecksum=False, formatspecs=__file_format_dict__, seektoend=False, returnfp=False):
87438753
checkcompressfile = CheckCompressionSubType(infile, formatspecs, filestart, True)
87448754
if(IsNestedDict(formatspecs) and checkcompressfile in formatspecs):
@@ -10402,7 +10412,7 @@ def InFileListFiles(infile, fmttype="auto", filestart=0, seekstart=0, seekend=0,
1040210412
elif(checkcompressfile == formatspecs['format_magic']):
1040310413
return ArchiveFileListFiles(infile, fmttype, filestart, seekstart, seekend, skipchecksum, formatspecs, saltkey, seektoend, verbose, newstyle, returnfp)
1040410414
else:
10405-
return False
10415+
return BSDTarFileListFiles(infile, formatspecs, verbose, returnfp)
1040610416
return False
1040710417

1040810418

0 commit comments

Comments
 (0)