Skip to content

Commit 010644c

Browse files
author
Kazuki Suzuki Przyborowski
committed
Update pyarchivefile.py
1 parent 8594ad7 commit 010644c

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

pyarchivefile.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7958,7 +7958,7 @@ def ListDirToArray(infiles, dirlistfromtxt=False, fmttype=__file_format_default_
79587958
outarray = MkTempFile()
79597959
packform = PackArchiveFile(infiles, outarray, dirlistfromtxt, fmttype, compression, compresswholefile,
79607960
compressionlevel, followlink, checksumtype, extradata, formatspecs, verbose, True)
7961-
listarrayfiles = ArchiveFileToArray(outarray, "auto", filestart, seekstart, seekend, listonly, True, skipchecksum, formatspecs, seektoend, returnfp)
7961+
listarrayfiles = ArchiveFileToArray(outarray, "auto", filestart, seekstart, seekend, listonly, True, True, skipchecksum, formatspecs, seektoend, returnfp)
79627962
return listarrayfiles
79637963

79647964

@@ -8086,13 +8086,12 @@ def RePackArchiveFile(infile, outfile, fmttype="auto", compression="auto", compr
80868086
else:
80878087
if(infile != "-" and not isinstance(infile, bytes) and not hasattr(infile, "read") and not hasattr(infile, "write")):
80888088
infile = RemoveWindowsPath(infile)
8089-
listarrayfiles = ArchiveFileToArray(infile, "auto", filestart, seekstart, seekend, False, True, skipchecksum, formatspecs, seektoend, returnfp)
8089+
listarrayfiles = ArchiveFileToArray(infile, "auto", filestart, seekstart, seekend, False, True, True, skipchecksum, formatspecs, seektoend, returnfp)
80908090
if(IsNestedDict(formatspecs) and fmttype in formatspecs):
80918091
formatspecs = formatspecs[fmttype]
80928092
elif(IsNestedDict(formatspecs) and fmttype not in formatspecs):
80938093
fmttype = __file_format_default__
80948094
formatspecs = formatspecs[fmttype]
8095-
80968095
if(IsNestedDict(formatspecs) and fmttype in formatspecs):
80978096
formatspecs = formatspecs[fmttype]
80988097
elif(IsNestedDict(formatspecs) and fmttype not in formatspecs):
@@ -8199,11 +8198,11 @@ def RePackArchiveFile(infile, outfile, fmttype="auto", compression="auto", compr
81998198
fdev_major = format(
82008199
int(listarrayfiles['ffilelist'][reallcfi]['fmajor']), 'x').lower()
82018200
fseeknextfile = listarrayfiles['ffilelist'][reallcfi]['fseeknextfile']
8202-
if(len(listarrayfiles['ffilelist'][reallcfi]['fextralist']) > listarrayfiles['ffilelist'][reallcfi]['fextrafields'] and len(listarrayfiles['ffilelist'][reallcfi]['fextralist']) > 0):
8201+
if(len(listarrayfiles['ffilelist'][reallcfi]['fextradata']) > listarrayfiles['ffilelist'][reallcfi]['fextrafields'] and len(listarrayfiles['ffilelist'][reallcfi]['fextradata']) > 0):
82038202
listarrayfiles['ffilelist'][reallcfi]['fextrafields'] = len(
8204-
listarrayfiles['ffilelist'][reallcfi]['fextralist'])
8203+
listarrayfiles['ffilelist'][reallcfi]['fextradata'])
82058204
if(not followlink and len(extradata) <= 0):
8206-
extradata = listarrayfiles['ffilelist'][reallcfi]['fextralist']
8205+
extradata = listarrayfiles['ffilelist'][reallcfi]['fextradata']
82078206
if(not followlink and len(jsondata) <= 0):
82088207
jsondata = listarrayfiles['ffilelist'][reallcfi]['fjsondata']
82098208
fcontents = listarrayfiles['ffilelist'][reallcfi]['fcontents']
@@ -8282,10 +8281,10 @@ def RePackArchiveFile(infile, outfile, fmttype="auto", compression="auto", compr
82828281
fdev_minor = format(int(flinkinfo['fminor']), 'x').lower()
82838282
fdev_major = format(int(flinkinfo['fmajor']), 'x').lower()
82848283
fseeknextfile = flinkinfo['fseeknextfile']
8285-
if(len(flinkinfo['fextralist']) > flinkinfo['fextrafields'] and len(flinkinfo['fextralist']) > 0):
8286-
flinkinfo['fextrafields'] = len(flinkinfo['fextralist'])
8284+
if(len(flinkinfo['fextradata']) > flinkinfo['fextrafields'] and len(flinkinfo['fextradata']) > 0):
8285+
flinkinfo['fextrafields'] = len(flinkinfo['fextradata'])
82878286
if(len(extradata) < 0):
8288-
extradata = flinkinfo['fextralist']
8287+
extradata = flinkinfo['fextradata']
82898288
if(len(jsondata) < 0):
82908289
extradata = flinkinfo['fjsondata']
82918290
fcontents = flinkinfo['fcontents']
@@ -8380,7 +8379,7 @@ def UnPackArchiveFile(infile, outdir=None, followlink=False, filestart=0, seekst
83808379
else:
83818380
if(infile != "-" and not hasattr(infile, "read") and not hasattr(infile, "write") and not (sys.version_info[0] >= 3 and isinstance(infile, bytes))):
83828381
infile = RemoveWindowsPath(infile)
8383-
listarrayfiles = ArchiveFileToArray(infile, "auto", filestart, seekstart, seekend, False, True, skipchecksum, formatspecs, seektoend, returnfp)
8382+
listarrayfiles = ArchiveFileToArray(infile, "auto", filestart, seekstart, seekend, False, True, True, skipchecksum, formatspecs, seektoend, returnfp)
83848383
if(not listarrayfiles):
83858384
return False
83868385
lenlist = len(listarrayfiles['ffilelist'])

0 commit comments

Comments
 (0)