AL90 wrote:It doesn't work.
Seems to works here.
I am using this when I pack the file :
FileInfo\external_fa = GetFileAttributes_(@FileName)
and this after unpacking the file :
SetFileAttributes_(@FileName, FileInfo\external_fa)
Test directory (c:\PureBasic400\Program\ZIP\)
Code: Select all
c:\PureBasic400\Program\ZIP\0.pb 1 538 18/06/07 13:49 ----
c:\PureBasic400\Program\ZIP\A.pb 1 538 18/06/07 13:49 -a--
c:\PureBasic400\Program\ZIP\H.pb 1 538 18/06/07 13:49 --h-
c:\PureBasic400\Program\ZIP\R.pb 1 538 18/06/07 13:49 r---
c:\PureBasic400\Program\ZIP\RA.pb 1 538 18/06/07 13:49 ra--
c:\PureBasic400\Program\ZIP\S.pb 1 538 18/06/07 13:49 ---s
Test code
Code: Select all
myFileinfo._PureZIP_FileInfo
MyZIP.s = "c:\PureBasic400\Program\ZIP\TestFile.zip"
If PureZIP_Archive_Create(MyZIP, #APPEND_STATUS_CREATE)
PureZIP_Archive_Compress("c:\PureBasic400\Program\ZIP\0.pb", #False)
PureZIP_Archive_Compress("c:\PureBasic400\Program\ZIP\A.pb", #False)
PureZIP_Archive_Compress("c:\PureBasic400\Program\ZIP\RA.pb", #False)
PureZIP_Archive_Compress("c:\PureBasic400\Program\ZIP\R.pb", #False)
PureZIP_Archive_Compress("c:\PureBasic400\Program\ZIP\H.pb", #False)
PureZIP_Archive_Compress("c:\PureBasic400\Program\ZIP\S.pb", #False)
PureZIP_Archive_Close()
EndIf
If PureZIP_Archive_Read(MyZIP)
Found = PureZIP_Archive_FindFirst()
While Found = #UNZ_OK
Info = PureZIP_Archive_FileInfo(@myFileinfo)
Debug "INFO ---"
Debug myFileinfo\FileName
Debug myFileinfo\external_fa.l
PureZIP_Archive_Extract("c:\PureBasic400\Program\ZIP2", #False)
Found = PureZIP_Archive_FindNext()
Wend
PureZIP_Archive_Close()
EndIf
End
Debug Output
Code: Select all
INFO ---
0.pb
128
INFO ---
A.pb
32
INFO ---
RA.pb
33
INFO ---
R.pb
1
INFO ---
H.pb
2
INFO ---
S.pb
4
Unpacked files (in c:\PureBasic400\Program\ZIP2\)
Code: Select all
c:\PureBasic400\Program\ZIP2\0.pb 1 538 18/06/07 13:49 ----
c:\PureBasic400\Program\ZIP2\A.pb 1 538 18/06/07 13:49 -a--
c:\PureBasic400\Program\ZIP2\H.pb 1 538 18/06/07 13:49 --h-
c:\PureBasic400\Program\ZIP2\R.pb 1 538 18/06/07 13:49 r---
c:\PureBasic400\Program\ZIP2\RA.pb 1 538 18/06/07 13:49 ra--
c:\PureBasic400\Program\ZIP2\S.pb 1 538 18/06/07 13:49 ---s
So it's ok here !?