@@ -9721,7 +9721,7 @@ def UnPackCatFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
97219721 else :
97229722 if (infile != "-" and not hasattr (infile , "read" ) and not hasattr (infile , "write" ) and not isinstance (infile , bytes )):
97239723 infile = RemoveWindowsPath (infile )
9724- listarrayfilespre = CatFileToArray (infile , "auto" , filestart , seekstart , seekend , False , True , True , skipchecksum , formatspecs , saltkey , seektoend , returnfp )
9724+ listarrayfilespre = ArchiveFileToArray (infile , "auto" , filestart , seekstart , seekend , False , True , True , skipchecksum , formatspecs , saltkey , seektoend , returnfp )
97259725 if (not listarrayfilespre ):
97269726 return False
97279727 if (not isinstance (listarrayfilespre , list )):
@@ -9791,7 +9791,7 @@ def UnPackCatFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
97919791 if (preservetime ):
97929792 os .utime (PrependPath (outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), (
97939793 listarrayfiles ['ffilelist' ][lcfi ]['fatime' ], listarrayfiles ['ffilelist' ][lcfi ]['fmtime' ]))
9794- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 1 ):
9794+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 1 ):
97959795 if (followlink ):
97969796 getflinkpath = listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ]
97979797 flinkid = prelistarrayfiles ['filetoid' ][getflinkpath ]
@@ -9866,7 +9866,7 @@ def UnPackCatFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
98669866 else :
98679867 os .link (listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ], PrependPath (
98689868 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]))
9869- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 2 ):
9869+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 2 ):
98709870 if (followlink ):
98719871 getflinkpath = listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ]
98729872 flinkid = prelistarrayfiles ['filetoid' ][getflinkpath ]
@@ -9941,7 +9941,7 @@ def UnPackCatFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
99419941 else :
99429942 os .symlink (listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ], PrependPath (
99439943 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]))
9944- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 5 ):
9944+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 5 ):
99459945 if (preservepermissions ):
99469946 os .mkdir (PrependPath (
99479947 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), listarrayfiles ['ffilelist' ][lcfi ]['fchmode' ])
@@ -9957,12 +9957,16 @@ def UnPackCatFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
99579957 if (preservetime ):
99589958 os .utime (PrependPath (outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), (
99599959 listarrayfiles ['ffilelist' ][lcfi ]['fatime' ], listarrayfiles ['ffilelist' ][lcfi ]['fmtime' ]))
9960- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 6 and hasattr (os , "mkfifo" )):
9960+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 6 and hasattr (os , "mkfifo" )):
99619961 os .mkfifo (PrependPath (
99629962 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), listarrayfiles ['ffilelist' ][lcfi ]['fchmode' ])
9963- if (returnfp ):
9964- fplist .append (listarrayfiles ['ffilelist' ][lcfi ]['fp' ])
9963+ elif ((listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 3 or listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 4 ) and hasattr (os , "makedev" ) and hasattr (os , "mknod" )):
9964+ outdev = os .makedev (listarrayfiles ['ffilelist' ][lcfi ]['frdev_major' ], listarrayfiles ['ffilelist' ][lcfi ]['frdev_minor' ])
9965+ os .mknod (PrependPath (
9966+ outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), listarrayfiles ['ffilelist' ][lcfi ]['fchmode' ], outdev )
99659967 lcfi = lcfi + 1
9968+ if (returnfp ):
9969+ fplist .append (listarrayfiles ['fp' ])
99669970 if (returnfp ):
99679971 return fplist
99689972 else :
0 commit comments