@@ -9722,7 +9722,7 @@ def UnPackFoxFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
97229722 else :
97239723 if (infile != "-" and not hasattr (infile , "read" ) and not hasattr (infile , "write" ) and not isinstance (infile , bytes )):
97249724 infile = RemoveWindowsPath (infile )
9725- listarrayfilespre = FoxFileToArray (infile , "auto" , filestart , seekstart , seekend , False , True , True , skipchecksum , formatspecs , saltkey , seektoend , returnfp )
9725+ listarrayfilespre = ArchiveFileToArray (infile , "auto" , filestart , seekstart , seekend , False , True , True , skipchecksum , formatspecs , saltkey , seektoend , returnfp )
97269726 if (not listarrayfilespre ):
97279727 return False
97289728 if (not isinstance (listarrayfilespre , list )):
@@ -9792,7 +9792,7 @@ def UnPackFoxFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
97929792 if (preservetime ):
97939793 os .utime (PrependPath (outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), (
97949794 listarrayfiles ['ffilelist' ][lcfi ]['fatime' ], listarrayfiles ['ffilelist' ][lcfi ]['fmtime' ]))
9795- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 1 ):
9795+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 1 ):
97969796 if (followlink ):
97979797 getflinkpath = listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ]
97989798 flinkid = prelistarrayfiles ['filetoid' ][getflinkpath ]
@@ -9867,7 +9867,7 @@ def UnPackFoxFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
98679867 else :
98689868 os .link (listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ], PrependPath (
98699869 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]))
9870- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 2 ):
9870+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 2 ):
98719871 if (followlink ):
98729872 getflinkpath = listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ]
98739873 flinkid = prelistarrayfiles ['filetoid' ][getflinkpath ]
@@ -9942,7 +9942,7 @@ def UnPackFoxFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
99429942 else :
99439943 os .symlink (listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ], PrependPath (
99449944 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]))
9945- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 5 ):
9945+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 5 ):
99469946 if (preservepermissions ):
99479947 os .mkdir (PrependPath (
99489948 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), listarrayfiles ['ffilelist' ][lcfi ]['fchmode' ])
@@ -9958,12 +9958,16 @@ def UnPackFoxFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
99589958 if (preservetime ):
99599959 os .utime (PrependPath (outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), (
99609960 listarrayfiles ['ffilelist' ][lcfi ]['fatime' ], listarrayfiles ['ffilelist' ][lcfi ]['fmtime' ]))
9961- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 6 and hasattr (os , "mkfifo" )):
9961+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 6 and hasattr (os , "mkfifo" )):
99629962 os .mkfifo (PrependPath (
99639963 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), listarrayfiles ['ffilelist' ][lcfi ]['fchmode' ])
9964- if (returnfp ):
9965- fplist .append (listarrayfiles ['ffilelist' ][lcfi ]['fp' ])
9964+ elif ((listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 3 or listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 4 ) and hasattr (os , "makedev" ) and hasattr (os , "mknod" )):
9965+ outdev = os .makedev (listarrayfiles ['ffilelist' ][lcfi ]['frdev_major' ], listarrayfiles ['ffilelist' ][lcfi ]['frdev_minor' ])
9966+ os .mknod (PrependPath (
9967+ outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), listarrayfiles ['ffilelist' ][lcfi ]['fchmode' ], outdev )
99669968 lcfi = lcfi + 1
9969+ if (returnfp ):
9970+ fplist .append (listarrayfiles ['fp' ])
99679971 if (returnfp ):
99689972 return fplist
99699973 else :
0 commit comments