Skip to content

Commit 43883e7

Browse files
committed
Small bug fix
1 parent 1e94590 commit 43883e7

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

foxfile.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def handler(signum, frame):
154154
checkcompressfile = pyfoxfile.CheckCompressionSubType(
155155
input_file, fnamedict, True)
156156
if((pyfoxfile.IsNestedDict(fnamedict) and checkcompressfile in fnamedict) or (pyfoxfile.IsSingleDict(fnamedict) and checkcompressfile==fnamedict['format_magic'])):
157-
tmpout = pyfoxfile.RePackFoxFile(input_file, getargs.output, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, getargs.filestart, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.secretkey, getargs.verbose, False)
157+
tmpout = pyfoxfile.RePackFoxFile(input_file, getargs.output, "auto", getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, getargs.filestart, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.secretkey, getargs.verbose, False)
158158
else:
159159
tmpout = pyfoxfile.PackFoxFileFromInFile(
160160
input_file, getargs.output, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, getargs.secretkey, getargs.verbose, False)
@@ -167,22 +167,22 @@ def handler(signum, frame):
167167
checkcompressfile = pyfoxfile.CheckCompressionSubType(
168168
input_file, fnamedict, True)
169169
if((pyfoxfile.IsNestedDict(fnamedict) and checkcompressfile in fnamedict) or (pyfoxfile.IsSingleDict(fnamedict) and checkcompressfile==fnamedict['format_magic'])):
170-
pyfoxfile.RePackFoxFile(input_file, getargs.output, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt,
170+
pyfoxfile.RePackFoxFile(input_file, getargs.output, "auto", getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt,
171171
False, getargs.filestart, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.secretkey, getargs.verbose, False)
172172
else:
173173
pyfoxfile.PackFoxFileFromInFile(input_file, getargs.output, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, getargs.secretkey, getargs.verbose, False)
174174
if(not tmpout):
175175
sys.exit(1)
176176
else:
177-
pyfoxfile.RePackFoxFile(input_file, getargs.output, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt,
177+
pyfoxfile.RePackFoxFile(input_file, getargs.output, "auto", getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt,
178178
False, getargs.filestart, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.secretkey, getargs.verbose, False)
179179
elif active_action == 'extract':
180180
if getargs.convert:
181181
checkcompressfile = pyfoxfile.CheckCompressionSubType(
182182
input_file, fnamedict, True)
183183
tempout = BytesIO()
184184
if((pyfoxfile.IsNestedDict(fnamedict) and checkcompressfile in fnamedict) or (pyfoxfile.IsSingleDict(fnamedict) and checkcompressfile==fnamedict['format_magic'])):
185-
tmpout = pyfoxfile.RePackFoxFile(input_file, tempout, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, getargs.filestart, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.secretkey, False, False)
185+
tmpout = pyfoxfile.RePackFoxFile(input_file, tempout, "auto", getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, getargs.filestart, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.secretkey, False, False)
186186
else:
187187
tmpout = pyfoxfile.PackFoxFileFromInFile(
188188
input_file, tempout, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, getargs.secretkey, False, False)
@@ -209,7 +209,7 @@ def handler(signum, frame):
209209
input_file, fnamedict, True)
210210
tempout = BytesIO()
211211
if((pyfoxfile.IsNestedDict(fnamedict) and checkcompressfile in fnamedict) or (pyfoxfile.IsSingleDict(fnamedict) and checkcompressfile==fnamedict['format_magic'])):
212-
tmpout = pyfoxfile.RePackFoxFile(input_file, tempout, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, getargs.filestart, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.secretkey, False, False, False)
212+
tmpout = pyfoxfile.RePackFoxFile(input_file, tempout, "auto", getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, False, getargs.filestart, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, getargs.secretkey, False, False, False)
213213
else:
214214
tmpout = pyfoxfile.PackFoxFileFromInFile(
215215
input_file, tempout, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pyfoxfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, getargs.secretkey, False, False)

pyfoxfile.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def _get(section_dict, key, default=None):
658658
__version_date__ = str(__version_date_info__[0]) + "." + str(
659659
__version_date_info__[1]).zfill(2) + "." + str(__version_date_info__[2]).zfill(2)
660660
__revision__ = __version_info__[3]
661-
__revision_id__ = "$Id: c04591e4a924fda4b8f7e1415268a2fc06c83124 $"
661+
__revision_id__ = "$Id$"
662662
if(__version_info__[4] is not None):
663663
__version_date_plusrc__ = __version_date__ + \
664664
"-" + str(__version_date_info__[4])
@@ -10250,9 +10250,9 @@ def RePackFoxFile(infile, outfile, fmttype="auto", compression="auto", compressw
1025010250
if (infile != "-" and not isinstance(infile, bytes_type) # bytes is str on Py2
1025110251
and not hasattr(infile, "read") and not hasattr(infile, "write")):
1025210252
infile = RemoveWindowsPath(infile)
10253-
listarrayfileslist = FoxFileToArray(
10253+
listarrayfileslist = ArchiveFileToArray(
1025410254
infile, "auto", filestart, seekstart, seekend,
10255-
False, True, True, skipchecksum, formatspecs, seektoend, False
10255+
False, True, True, skipchecksum, formatspecs, saltkey, seektoend, False
1025610256
)
1025710257

1025810258
# ---------- Format specs selection ----------
@@ -10385,8 +10385,7 @@ def RePackFoxFile(infile, outfile, fmttype="auto", compression="auto", compressw
1038510385
fcompression = cur_entry['fcompression']
1038610386
fcsize = format(int(cur_entry['fcsize']), 'x').lower()
1038710387
fdev = format(int(cur_entry['fdev']), 'x').lower()
10388-
fdev_minor = format(int(cur_entry['fminor']), 'x').lower()
10389-
fdev_major = format(int(cur_entry['fmajor']), 'x').lower()
10388+
frdev = format(int(cur_entry['frdev']), 'x').lower()
1039010389
fseeknextfile = cur_entry['fseeknextfile']
1039110390

1039210391
# extra fields sizing
@@ -10494,8 +10493,7 @@ def RePackFoxFile(infile, outfile, fmttype="auto", compression="auto", compressw
1049410493
fcompression = flinkinfo['fcompression']
1049510494
fcsize = format(int(flinkinfo['fcsize']), 'x').lower()
1049610495
fdev = format(int(flinkinfo['fdev']), 'x').lower()
10497-
fdev_minor = format(int(flinkinfo['fminor']), 'x').lower()
10498-
fdev_major = format(int(flinkinfo['fmajor']), 'x').lower()
10496+
frdev = format(int(flinkinfo['frdev']), 'x').lower()
1049910497
fseeknextfile = flinkinfo['fseeknextfile']
1050010498
if (len(flinkinfo['fextradata']) > flinkinfo['fextrafields']
1050110499
and len(flinkinfo['fextradata']) > 0):
@@ -10538,7 +10536,7 @@ def RePackFoxFile(infile, outfile, fmttype="auto", compression="auto", compressw
1053810536
tmpoutlist = [
1053910537
ftypehex, fencoding, fcencoding, fname, flinkname, fsize, fblksize, fblocks, fflags, fatime, fmtime,
1054010538
fctime, fbtime, fmode, fwinattributes, fcompression, fcsize, fuid, funame,
10541-
fgid, fgname, fcurfid, fcurinode, flinkcount, fdev, fdev_minor, fdev_major, fseeknextfile
10539+
fgid, fgname, fcurfid, fcurinode, flinkcount, fdev, frdev, fseeknextfile
1054210540
]
1054310541

1054410542
if(fvendorfields>0 and len(ffvendorfieldslist)>0):

0 commit comments

Comments
 (0)