@@ -79,6 +79,7 @@ def handler(signum, frame):
7979__file_format_hex__ = pycatfile .__file_format_hex__
8080__file_format_delimiter__ = pycatfile .__file_format_delimiter__
8181__file_format_dict__ = pycatfile .__file_format_dict__
82+ __file_format_default__ = pycatfile .__file_format_default__
8283__use_new_style__ = pycatfile .__use_new_style__
8384__use_advanced_list__ = pycatfile .__use_advanced_list__
8485__use_alt_inode__ = pycatfile .__use_alt_inode__
@@ -152,6 +153,7 @@ def handler(signum, frame):
152153 fnamehex = __file_format_hex__
153154else :
154155 fnamemagic = fname
156+ __file_format_default__ = fnamemagic
155157 fnamelen = len (fname )
156158 fnamehex = binascii .hexlify (fname .encode ("UTF-8" )).decode ("UTF-8" )
157159fnamesty = __use_new_style__
@@ -175,16 +177,14 @@ def handler(signum, frame):
175177 checkcompressfile = pycatfile .CheckCompressionSubType (
176178 input_file , fnamedict , True )
177179 if (checkcompressfile == "catfile" ):
178- tmpout = pycatfile .RePackArchiveFile (input_file , getargs .output , getargs .compression , getargs .wholefile ,
179- getargs .level , pycatfile .compressionlistalt , False , 0 , 0 , [getargs .checksum , getargs .checksum , getargs .checksum ], getargs .skipchecksum , [], fnamedict , getargs .verbose , False )
180+ tmpout = pycatfile .RePackArchiveFile (input_file , getargs .output , getargs .compression , getargs .wholefile , getargs .level , pycatfile .compressionlistalt , False , 0 , 0 , [getargs .checksum , getargs .checksum , getargs .checksum ], getargs .skipchecksum , [], fnamedict , getargs .verbose , False )
180181 else :
181182 tmpout = pycatfile .PackArchiveFileFromInFile (
182- input_file , getargs .output , getargs .compression , getargs .wholefile , getargs .level , pycatfile .compressionlistalt , [getargs .checksum , getargs .checksum , getargs .checksum ], [], fnamedict , getargs .verbose , False )
183+ input_file , getargs .output , __file_format_default__ , getargs .compression , getargs .wholefile , getargs .level , pycatfile .compressionlistalt , [getargs .checksum , getargs .checksum , getargs .checksum ], [], fnamedict , getargs .verbose , False )
183184 if (not tmpout ):
184185 sys .exit (1 )
185186 else :
186- pycatfile .PackArchiveFile (getargs .input , getargs .output , getargs .text , getargs .compression ,
187- getargs .wholefile , getargs .level , pycatfile .compressionlistalt , False , [getargs .checksum , getargs .checksum , getargs .checksum ], [], fnamedict , getargs .verbose , False )
187+ pycatfile .PackArchiveFile (getargs .input , getargs .output , getargs .text , __file_format_default__ , getargs .compression , getargs .wholefile , getargs .level , pycatfile .compressionlistalt , False , [getargs .checksum , getargs .checksum , getargs .checksum ], [], fnamedict , getargs .verbose , False )
188188 elif active_action == 'repack' :
189189 if getargs .convert :
190190 checkcompressfile = pycatfile .CheckCompressionSubType (
@@ -193,8 +193,7 @@ def handler(signum, frame):
193193 pycatfile .RePackArchiveFile (input_file , getargs .output , getargs .compression , getargs .wholefile , getargs .level , pycatfile .compressionlistalt ,
194194 False , 0 , 0 , [getargs .checksum , getargs .checksum , getargs .checksum ], getargs .skipchecksum , [], fnamedict , getargs .verbose , False )
195195 else :
196- pycatfile .PackArchiveFileFromInFile (input_file , getargs .output , getargs .compression ,
197- getargs .wholefile , getargs .level , pycatfile .compressionlistalt , [getargs .checksum , getargs .checksum , getargs .checksum ], [], fnamedict , getargs .verbose , False )
196+ pycatfile .PackArchiveFileFromInFile (input_file , getargs .output , __file_format_default__ , getargs .compression , getargs .wholefile , getargs .level , pycatfile .compressionlistalt , [getargs .checksum , getargs .checksum , getargs .checksum ], [], fnamedict , getargs .verbose , False )
198197 if (not tmpout ):
199198 sys .exit (1 )
200199 else :
@@ -206,11 +205,10 @@ def handler(signum, frame):
206205 input_file , fnamedict , True )
207206 tempout = BytesIO ()
208207 if (checkcompressfile == "catfile" ):
209- tmpout = pycatfile .RePackArchiveFile (input_file , tempout , getargs .compression , getargs .wholefile ,
210- getargs .level , pycatfile .compressionlistalt , False , 0 , 0 , [getargs .checksum , getargs .checksum , getargs .checksum ], getargs .skipchecksum , [], fnamedict , False , False )
208+ tmpout = pycatfile .RePackArchiveFile (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 )
211209 else :
212210 tmpout = pycatfile .PackArchiveFileFromInFile (
213- input_file , tempout , getargs .compression , getargs .wholefile , getargs .level , pycatfile .compressionlistalt , [getargs .checksum , getargs .checksum , getargs .checksum ], [], fnamedict , False , False )
211+ input_file , tempout , __file_format_default__ , getargs .compression , getargs .wholefile , getargs .level , pycatfile .compressionlistalt , [getargs .checksum , getargs .checksum , getargs .checksum ], [], fnamedict , False , False )
214212 if (not tmpout ):
215213 sys .exit (1 )
216214 input_file = tempout
@@ -237,11 +235,10 @@ def handler(signum, frame):
237235 input_file , fnamedict , True )
238236 tempout = BytesIO ()
239237 if (checkcompressfile == "catfile" ):
240- tmpout = pycatfile .RePackArchiveFile (input_file , tempout , getargs .compression , getargs .wholefile ,
241- getargs .level , pycatfile .compressionlistalt , False , 0 , 0 , [getargs .checksum , getargs .checksum , getargs .checksum ], getargs .skipchecksum , [], fnamedict , False , False )
238+ tmpout = pycatfile .RePackArchiveFile (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 )
242239 else :
243240 tmpout = pycatfile .PackArchiveFileFromInFile (
244- input_file , tempout , getargs .compression , getargs .wholefile , getargs .level , pycatfile .compressionlistalt , [getargs .checksum , getargs .checksum , getargs .checksum ], [], fnamedict , False , False )
241+ input_file , tempout , __file_format_default__ , getargs .compression , getargs .wholefile , getargs .level , pycatfile .compressionlistalt , [getargs .checksum , getargs .checksum , getargs .checksum ], [], fnamedict , False , False )
245242 input_file = tempout
246243 if (not tmpout ):
247244 sys .exit (1 )
0 commit comments