MonkeyBread Software Zip Utility Error -102?

This isn’t really a Xojo question, but I couldn’t find the answer on the Monkeybread site, so I’m thinking this is something that everybody but me already knows:

Dim z as New UnZipMBS(target folder)

That last line fails with LastError = -102

Does anyone know what that means? And even better, where I can find a list of these error codes?

-102 is a UnzipParameterError

The constructor parameter is incorrect, it should be one word?

Dim z as New UnZipMBS(targetFolder)

Error codes are here

That’s odd, this same line of code has worked great for years, it only cropped up this morning when a Windows user reported it - and he’s definitely not my only Windows user :slight_smile:

Thanks for the link!

  • John

This shouldn’t compile due to the space between target and folder.

If this is targetFolder and is a typo on the forum post and it does compile ok, are you checking that the folderitem/path is valid before passing it to UnZipMBS? There’s plenty of places that error is returned from the library that Christian uses, mainly path related issues, maybe he can shed a little more light on it in the morning.

Does the file exist?
Does it have a length?
Is targetfolder a FOLDER (incorrect) or a file?
Is it truly a zip file?
Is it in a dropbox, onedrive, or iCloud area and ‘not quite available fast enough’?

That are excellent points to check.

I would recommend to move to Archive classes as they can do much more than the old zip classes.

Are the archive classes compatible with existing zip files? Can they create zip files that older apps can open?

It’s a typo, sorry. Yes, the path is valid and the file does exist, though it’s fairly small (about 1k). What’s weird is that this code has been working for the last 4 years without any problems, but recently there have been several reports from Windows users that is is broken.

Anyway, thank you for your help!

Do you rummage through any SpecialFolder? I have a vague memory of possible issue that I need to get around to reporting relating to I think Documents via SpecialFolder.

The folderitem (which is a file), starts out in a document folder or desktop, my app copies it to (a work folder), where it is unzipped and processed. Nothing has changed in terms of code or how the file is handled, on both Mac and Windows. I’m looking into whether the folderitem has any unhelpful permissions.

Ask them if they recall using a microsoft account when they first installed windows or when they first signed into their machine after they bought it.

If this is the issue I found, from memory I think some of the specialfolders point to non-existent locations.

Interesting, I’m beginning to think the file was damaged or not saved completely due to something like this. Thanks for the tip!