Catalina unzip File Permissions Problems

Wondering what an “incorrect” permission is in the first place… In your example, if I go, as an admin user, to remove the executable flag of an app (say, as a temporary solution to prevent users from launching the app; I know, silly example, but I don’t have one handy right now), I guess it’s “incorrect” from the OS point of view (a file containing code that isn’t executable), but “correct” in the user’s expectation.
So, if it’s the user’s choice of “breaking”/changing permissions, I guess they must be preserved.

Now, if the permissions become corrupted (I/O errors while copying a file, for instance), then perhaps they should be fixed while being zipped (perhaps not: how do you know they have been “corrupted” and not simply modified voluntarily by the user?).

My personal opinion: unless you have a specific case (like the point of this thread: attributes not kept from one OS to another), the user expects the permissions to be the same when unzipping an archive than when it was zipped. If the original item is corrupted, the user would get an error (e.g. “This item could not be opened.”) so it’s expected the copy behaves like that as well.

ZipMBS is very old. Please use ArchiveWriterMBS for newer projects.

see
https://www.monkeybreadsoftware.net/pluginpart-archive.shtml

  • Interesting - I didn’t know there was another option - could you perhaps add a note to Monkeybread Xojo plugin - ZipMBS class ?
  • have you tested ArchiveWriterMBS to see if the zip files it makes are Cataliana friendly?