Skip to content

Commit

Permalink
Small update
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski committed Feb 15, 2025
1 parent 5093190 commit 433b3d0
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 119 deletions.
2 changes: 1 addition & 1 deletion altcatfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def main():
if args.create:
pycatfile.PackCatFile(args.input, args.output, False, __file_format_default__, args.compression, args.level, pycatfile.compressionlistalt, False, [args.checksum, args.checksum, args.checksum], [], {}, format_dict, args.verbose, False)
elif args.repack:
pycatfile.RePackCatFile( input_file, args.output, args.compression, args.level, pycatfile.compressionlistalt, [args.checksum, args.checksum, args.checksum], args.verbose)
pycatfile.RePackCatFile(input_file, args.output, args.compression, args.level, pycatfile.compressionlistalt, [args.checksum, args.checksum, args.checksum], False, args.verbose)
elif args.extract:
pycatfile.UnPackCatFile(input_file, args.output, args.verbose, args.preserve)
elif args.list:
Expand Down
10 changes: 5 additions & 5 deletions catfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,26 +209,26 @@ def handler(signum, frame):
sys.exit(1)
input_file = tempout
pycatfile.UnPackCatFile(input_file, getargs.output, False, 0, 0, getargs.skipchecksum,
fnamedict, getargs.verbose, getargs.preserve, getargs.preserve, False)
fnamedict, getargs.verbose, getargs.preserve, getargs.preserve, False, False)
elif active_action == 'list':
if getargs.convert:
checkcompressfile = pycatfile.CheckCompressionSubType(
input_file, fnamedict, True)
if((IsNestedDict(fnamedict) and compresscheck in fnamedict) or (IsSingleDict(fnamedict) and compresscheck==fnamedict['format_magic'])):
tmpout = pycatfile.CatFileListFiles(input_file, "auto", 0, 0, getargs.skipchecksum, fnamedict, getargs.verbose, False)
tmpout = pycatfile.CatFileListFiles(input_file, "auto", 0, 0, getargs.skipchecksum, fnamedict, False, getargs.verbose, False)
else:
tmpout = pycatfile.InFileListFiles(input_file, getargs.verbose, fnamedict, False)
tmpout = pycatfile.InFileListFiles(input_file, getargs.verbose, fnamedict, False, False)
if(not tmpout):
sys.exit(1)
else:
pycatfile.CatFileListFiles(input_file, "auto", 0, 0, getargs.skipchecksum, fnamedict, getargs.verbose, False)
pycatfile.CatFileListFiles(input_file, "auto", 0, 0, getargs.skipchecksum, fnamedict, False, getargs.verbose, False)
elif active_action == 'validate':
if getargs.convert:
checkcompressfile = pycatfile.CheckCompressionSubType(
input_file, fnamedict, True)
tempout = BytesIO()
if((IsNestedDict(fnamedict) and compresscheck in fnamedict) or (IsSingleDict(fnamedict) and compresscheck==fnamedict['format_magic'])):
tmpout = pycatfile.RePackCatFile(input_file, tempout, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, False, False)
tmpout = pycatfile.RePackCatFile(input_file, tempout, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, False, 0, 0, [getargs.checksum, getargs.checksum, getargs.checksum], getargs.skipchecksum, [], {}, fnamedict, False, False, False)
else:
tmpout = pycatfile.PackCatFileFromInFile(
input_file, tempout, __file_format_default__, getargs.compression, getargs.wholefile, getargs.level, pycatfile.compressionlistalt, [getargs.checksum, getargs.checksum, getargs.checksum], [], {}, fnamedict, False, False)
Expand Down
4 changes: 2 additions & 2 deletions neocatfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@
False, [args.checksum, args.checksum, args.checksum], [], {}, pycatfile.__file_format_dict__, args.verbose, False)
elif primary_action == 'repack':
pycatfile.RePackCatFile(
input_file, args.output, args.compression, args.level, pycatfile.compressionlistalt, [args.checksum, args.checksum, args.checksum], args.verbose)
input_file, args.output, args.compression, args.level, pycatfile.compressionlistalt, [args.checksum, args.checksum, args.checksum], False, args.verbose)
elif primary_action == 'extract':
pycatfile.UnPackCatFile(
input_file, args.output, args.verbose, args.preserve)
input_file, args.output, args.verbose, False, args.preserve)
elif primary_action == 'list':
if args.convert == 'tar':
pycatfile.TarFileListFiles(input_file, verbose=args.verbose)
Expand Down
Loading

0 comments on commit 433b3d0

Please sign in to comment.