Zip extension not working with Mac OS X zip files?

Zip extension not working with Mac OS X zip files?

  
Hi all,

I've been trying to use the Zip extension on the Service Platform 6.0.1.24

"Version 6.0.1.24. Using this simple accelerator you can create a Zip package to provide a faster and more convenient way for users to download or upload a large set of files."

and after calling LoadZip() to load the file into memory I'm using the GetFiles()  to return a list of files that subsequently get extracted and saved on my application one by one. This is working just fine for ZIP files created on Windows but when testing with zip files created on Mac OS I get the following error message when calling GetFiles()

"Capacity must be positive.
Parameter name: capacity"

Does anyone know if there are any known issues with this or offer some help?

Thank you,
Joao Martinho
Joao Martinho wrote:
Hi all,

I've been trying to use the Zip extension on the Service Platform 6.0.1.24

"Version 6.0.1.24. Using this simple accelerator you can create a Zip package to provide a faster and more convenient way for users to download or upload a large set of files."

and after calling LoadZip() to load the file into memory I'm using the GetFiles()  to return a list of files that subsequently get extracted and saved on my application one by one. This is working just fine for ZIP files created on Windows but when testing with zip files created on Mac OS I get the following error message when calling GetFiles()

"Capacity must be positive.
Parameter name: capacity"

Does anyone know if there are any known issues with this or offer some help?

Thank you,
Joao Martinho
 
 Hi there João!

Can you provide us with two example .zip files, one that work sand one that don't? So we can help you better.

Cheers,
Miguel
Miguel Antunes wrote:
 
 Hi there João!

Can you provide us with two example .zip files, one that work sand one that don't? So we can help you better.

Cheers,
Miguel
 
 Hi Miguel,

This zip file for example doesn't work. I'll post a second file that does.

Thanks,
Joao
wrote:
 
 Hi Miguel,

This zip file for example doesn't work. I'll post a second file that does.

Thanks,
Joao
 
 And here is the file created on Windows that works without problems.

Cheers,
João
Hi João,

I've just been playing around with Zip extension, from what I know this extensions uses #ziplib (SharpZipLib, formerly NZipLib)  which is a .Zip library written in C# for .net.

There are some users complaining about it on their forums about the same problem, it seems that MAC OS and .zip files are not the best friends. I'll get a bit deeper now, in the extension code there is a line where a MemoryStream is created, and its being sent as the MemoryStream capacity the size of the zip, since the library can't read the size (because being a mac os .zip file) the MemoryStream is being initialized with the value "-1", which causes the error you're getting.

I've manage to quick fix this, but after that I got a different error ( just for reference I'll leave it here: Wrong Local header signature: 0x8098FF4). 

I was reading their forums and someone said that in newer versions of the library they have fixed some problems with Mac OS .zip files. I don't know exactly which version of the lib is being used in the extension. I've got the source code from the library github and compiled a new .dll with their last version of code. I'm now in the process of redoing the .zip extension so I can try and see if this error gets fixed.

I'll keep you updated on this, but since I don't have that much time to spare :) my advise is to report this directly to our support team (support@outsystems.com) for a better and faster reply on this matter, you can also refer this post in the email.

Cheers!
Miguel
Thanks for the information Miguel!

I'll report this to the support too.

Thank you and regards,
Joao
Hi all,

There are any news regarding this issue? We have the same problem to decompress a zip file previously created on a MAC OS.

Thank you.

Best regards,
Pedro Matias