@@ -9715,7 +9715,7 @@ def UnPackNeoFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
97159715 else :
97169716 if (infile != "-" and not hasattr (infile , "read" ) and not hasattr (infile , "write" ) and not isinstance (infile , bytes )):
97179717 infile = RemoveWindowsPath (infile )
9718- listarrayfilespre = NeoFileToArray (infile , "auto" , filestart , seekstart , seekend , False , True , True , skipchecksum , formatspecs , saltkey , seektoend , returnfp )
9718+ listarrayfilespre = ArchiveFileToArray (infile , "auto" , filestart , seekstart , seekend , False , True , True , skipchecksum , formatspecs , saltkey , seektoend , returnfp )
97199719 if (not listarrayfilespre ):
97209720 return False
97219721 if (not isinstance (listarrayfilespre , list )):
@@ -9785,7 +9785,7 @@ def UnPackNeoFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
97859785 if (preservetime ):
97869786 os .utime (PrependPath (outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), (
97879787 listarrayfiles ['ffilelist' ][lcfi ]['fatime' ], listarrayfiles ['ffilelist' ][lcfi ]['fmtime' ]))
9788- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 1 ):
9788+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 1 ):
97899789 if (followlink ):
97909790 getflinkpath = listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ]
97919791 flinkid = prelistarrayfiles ['filetoid' ][getflinkpath ]
@@ -9860,7 +9860,7 @@ def UnPackNeoFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
98609860 else :
98619861 os .link (listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ], PrependPath (
98629862 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]))
9863- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 2 ):
9863+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 2 ):
98649864 if (followlink ):
98659865 getflinkpath = listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ]
98669866 flinkid = prelistarrayfiles ['filetoid' ][getflinkpath ]
@@ -9935,7 +9935,7 @@ def UnPackNeoFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
99359935 else :
99369936 os .symlink (listarrayfiles ['ffilelist' ][lcfi ]['flinkname' ], PrependPath (
99379937 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]))
9938- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 5 ):
9938+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 5 ):
99399939 if (preservepermissions ):
99409940 os .mkdir (PrependPath (
99419941 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), listarrayfiles ['ffilelist' ][lcfi ]['fchmode' ])
@@ -9951,12 +9951,16 @@ def UnPackNeoFile(infile, outdir=None, followlink=False, filestart=0, seekstart=
99519951 if (preservetime ):
99529952 os .utime (PrependPath (outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), (
99539953 listarrayfiles ['ffilelist' ][lcfi ]['fatime' ], listarrayfiles ['ffilelist' ][lcfi ]['fmtime' ]))
9954- if (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 6 and hasattr (os , "mkfifo" )):
9954+ elif (listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 6 and hasattr (os , "mkfifo" )):
99559955 os .mkfifo (PrependPath (
99569956 outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), listarrayfiles ['ffilelist' ][lcfi ]['fchmode' ])
9957- if (returnfp ):
9958- fplist .append (listarrayfiles ['ffilelist' ][lcfi ]['fp' ])
9957+ elif ((listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 3 or listarrayfiles ['ffilelist' ][lcfi ]['ftype' ] == 4 ) and hasattr (os , "makedev" ) and hasattr (os , "mknod" )):
9958+ outdev = os .makedev (listarrayfiles ['ffilelist' ][lcfi ]['frdev_major' ], listarrayfiles ['ffilelist' ][lcfi ]['frdev_minor' ])
9959+ os .mknod (PrependPath (
9960+ outdir , listarrayfiles ['ffilelist' ][lcfi ]['fname' ]), listarrayfiles ['ffilelist' ][lcfi ]['fchmode' ], outdev )
99599961 lcfi = lcfi + 1
9962+ if (returnfp ):
9963+ fplist .append (listarrayfiles ['fp' ])
99609964 if (returnfp ):
99619965 return fplist
99629966 else :
0 commit comments