@Rob any news ?
If you think Corona cannot fix this quickly, you should put a note in the plugin, that zipping multiple files does not work.
@Rob any news ?
If you think Corona cannot fix this quickly, you should put a note in the plugin, that zipping multiple files does not work.
This issue should now be fixed.
Additionally, you should get an error sent to your listener for more cases (such as missing parameters, files, etc.).
Give it a whirl and let us know if you encounter any issues.
Hi Michael,
I confirm that it is working perfectly. Thank you very much.
Nick
As always, to help with a specific question like this we need specific details to help us match your setup.
Which version of Corona are you using? For example, I’m using 2015.2716.
What systems have you tested this on?
Hi roaming, you are so right and I am sorry about that.
I am using 2015.2697
Problem on Windows 7 Simulator and Android 5.0.2
Also please link to the example you used. I found an unzip test, but no zip test so far…don’t like to have to search to help.
Going out for now…back later.
Example taken from Corona help file : https://docs.coronalabs.com/plugin/zip/compress.html#options.srcbasedir-required
local zip = require( "plugin.zip" ) -- Attempts to compress files in the "filenames" parameter to "test.zip". local function zipListener( event ) if ( event.isError ) then print( "Error!" ) else print ( "event.name: " .. event.name ) print ( "event.type: " .. event.type ) --example response --event.response = { --[1] = "space.jpg", --[2] = "space1.jpg", --} end end local zipOptions = { zipFile = "test.zip", zipBaseDir = system.DocumentsDirectory, srcBaseDir = system.ResourceDirectory, srcFiles = { "space.jpg", "space1.jpg", "space2.jpg" }, listener = zipListener } zip.compress( zipOptions )
Ah, I see. That’s not what I understood when you said ‘plugin help page’. I thought you meant the github link off the store page…
Regardless, just wanted to start in the same place as you and we’re on the same page now.
I’ve written a sample and tested it.
http://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2015/09/zip.zip
My example zips up two PNG files and as you’ve seen, only the last one is getting stored.
To debug, I added a little more output to see what the listener is seeing:
type compress name zip errorMessage isError false response table: 03B7F460 event.name: zip event.type: compress 0 pinky.png
The last line gives me a clue. It looks like the indexing is hosed up. See how ‘pinky.png’ is stored at index 0? That should be 1 or higher. So, if I were to warrant a guess I’d say the indexing code in the zip plugin is not getting initialized and/or incremented so all objects are listed at ‘0’ and the last one is the only one found when it is time to zip.
I think you can submit this as a bug at this point and use the above linked code (download if needed) to submit the bug.
Note however. I think you can get the plugin code and probably find the exact source of this issue:
I would totally understand if you simply filed a bug though and I concur that it is likely a bug.
PS - Additional details for your bug filing. This seems to fail on:
So is may be the ‘core’ zip code (if there is a common set) as it is showing in multiple places.
Hi. If you do file a bug, please post the bug number here too. That’s usually good for when Rob, Brent, and the crew read these posts.
If you don’t want to file the bug, I will after one more double check. This does look like a bug, but I’ll double check when I’m better focused.
Cheers,
Ed
PS - I hope I was’t being too short w/ you earlier. I was in a mad rush to get out of the house, but wanted to see if I could figure out the issue.
Do not worry about being too short, I can manage
and you were right with your comments to be more precised, We did not have time to report the bug yet as we did a work around for the time being. If you want to report it with all the details you mention, it would be nice. If not, do not worry, we will report it.
PS: English is not my primary language, so I may do a few mistakes.
Nick
If you file a bug report, please include this forum thread in the text of the bug report too. It will be good for the engineers to see this discussion.
Rob
A bug report (42901) has been submit.
@Rob, do you think its possible to know if this is a bug that will get a short term attention or it could take time ?
thank you
Nick
We are working on a new public build. We are only fixing core bugs until this is out (unless it’s super critical). Plugins can be fixed outside of the core build cycle. In preparation for this, we are focused on regression bugs, iOS 9 minimum support, Android 6 features (though those will probably not make the public release).
Rob
@Rob, now that the new public version is release, any chance we could see this bug fixed quickly as it prevent us from zipping multiple files.
thanks
Nick
I have same problem and I install latest daily build and it’s not fixed. :wacko:
Plugins like the Zip plugin are in no way tied to daily builds. A new daily build won’t fix problems with plugins. Plugin fixes are released independently of daily builds.
The one exception is if a plugin needs a feature of a daily build, like supporting the iOS 9 SDK. or like the Google Play plugin (for admob) requires Android 2.3, so you can’t use it on a version older than where we changed the minimum Android support to 2.3.
We may make note of plugin fixes in daily build release notes, but that’s the only place we have to update you on plugin updates.
@Rob, I do understand what you are saying, but do you have an idea of when the zip plugin will be fixed ?
No. I asked Engineering to see where it is on their todo list. But I asked late last night and with it being the weekend, I don’t expect a response until office hours next week.
Rob