Page 1 of 1

addpackfile after openpack not working in 5.42

Posted: Wed Apr 06, 2016 3:46 pm
by Poltergeist

Code: Select all

UseZipPacker()
Debug CreatePack(0,"c:\temp\test.zip")
Debug AddPackFile(0,"c:\temp\unpacked\Tobbe 2.lic","Tobbe 2.lic")
Debug ClosePack(0)
Debug OpenPack(0,"c:\temp\test.zip")
Debug AddPackFile(0,"c:\temp\unpacked\Tobbe 2.vbs","Tobbe 2.vbs")
ClosePack(0)
After creating a zipfile using createpack(), I sometimes do have the need to add an extra file. For that, I use openpack(), and then addfilepack. At least, untill PB version 5.31. I just downloaded the latest 5.42 version, and then it does not work anymore. I can create a pack, add multiple files to it, close the file. After opening the file (with OpenPack), the AddPackFile function returns a 0, and the file is not added into the zip file.

Re: addpackfile after openpack not working in 5.42

Posted: Thu Apr 07, 2016 5:04 am
by collectordave
Similar problem?

Trying to add files to an archive.

Take a look at this thread http://www.purebasic.fr/english/viewtop ... 13&t=63654

It unpacks then adds files etc the repacks.

Re: addpackfile after openpack not working in 5.42

Posted: Thu Apr 07, 2016 7:56 am
by Poltergeist
Ofcourse that would work, but it's a workaround for something that used to work.

Tested some more. In 5.40, the addpackfile after the openpack gives a [ERROR] Invalid memory access. (read error at address 0)
In 5.42, the same command just returns a zero.

Re: addpackfile after openpack not working in 5.42

Posted: Sat Apr 09, 2016 9:27 am
by walbus
You must delete the pack and write complete new
Hold the entries in a list, so you can write again the pack
This is not a bug in 542