Zip is broken on XOJO 2023R3.1

MacOS Ventura 13.6.1
XOJO 2023R3.1

Standard zip, unzip, on using the MacOS zip utility i get a crash with

(Error 79 - Inappropriate file type or format).

On unzipping i get an

Extraction error -104

Correction, it seems that 104 is when trying to unzip using code while the binary exists in my case, If i want to unzip app.app and the app exists in the location i get 104 , while i don’t get same error when i unzip a windows app on macOS and the Folder gets overwritten without any warning , Any idea how i can force that ?

Any idea on the first issue ?

Is this some Xojo question or are you having trouble with the OS and utilities and asking for help about the OS ?

Error 79 says that your file is corrupted.

104 seems related to corruption too, but very related to files inside folders being synchronized (iCloud, Google Drive, etc).

Synchonized folders (or parallel antivirus inspection locking contents) may be the root of your problems.

Try copying the files involved to some temporary and static folder and processing them there.

Yes, related to XOJO

I just do some tests on FolderItem.Zip and FolderItem.Unzip and it seems that it is more hit or miss than always working . No idea why .

The idea was to have some code on build of the app to create the zip of the binary for windows and macos and then the utility app as well done in xojo to unzip that and dump it in /Applications folder and in the install folder on windows

So far unzip, when it does work, it works well for the .app part if the destination does not exist, if it does then i get the 104 error . But in all cases using the Archive utility app throws that 79 error.

And i don’t have any cloud enabled or antivirus or any other issue, so, so those are out of the question.

So far it seems that 104 , at least on MacOS is related to file existence, so if the destination file exists then it cannot override it, so in my case i would need to check if destination exists, then back it up, then delete it , put the new one and if all works then delete the backup

As for the 79 error, no idea so far, i’ll dig more into it.

I guess it would be nice to have more details on those errors than a simple number .

If I recall correctly, and you’re using URLConnection to download the zip, the FileReceived event fires before the final bytes are written to disk.

It makes me think that Xojo maybe is building a non-compatible zip file envelope structure to hold the compressed streams. So only FolderItem.Unzip could expand such “zip” file.

Edit:

I’ve made an experiment under windows and I could see the files from a folder I’ve zipped.
No exceptions thrown, but “LastErrorCode” was 101 that maybe is not a real error.

The bug seems present in other places too: folderitem.lasterrorcode after copyfileto has 101 and should be 0

Still a Zip bug in Xojo 2024 R2.1 Mac OS 14.2.1. Haven’t tried on Windows

Have you created an issue? Do you have sample code?