More and more people are using Mac’s for development these days. As an example, a lot of the core developers from some of the leading web frameworks use Mac as their primary development platform. Several plugin and theme authors for WordPress also develop on Mac. While this is a good thing, there is one particular side effect of this development that annoys me beyond relief.
It seems that the easiest way to archive something on Mac is to right click on your directory of choice in Finder and select “Archive as…”. This creates a Zip file, which then the developer can distribute to users. The problem is that Apple, like many other software giants, tends to twist and bend the user’s will and interpret what the user wants to mean something else. In this case, the natural thing for the OS to do is pack up that directory, and ONLY that directory in a Zip file. But no sir, how can that be? How can Apple “transparently” embed some metadata in the Zip file so that if some other Mac user opens it in Finder, he/she can benefit from this metadata.
0 02-02-07 12:37 Cutline 1.1/
12292 01-31-07 17:16 Cutline 1.1/.DS_Store
0 02-02-07 12:38 __MACOSX/
0 02-02-07 12:38 __MACOSX/Cutline 1.1/
82 01-31-07 17:16 __MACOSX/Cutline 1.1/._.DS_Store
82 01-31-07 00:12 __MACOSX/Cutline 1.1/._ie6.css
238 01-30-07 23:59 Cutline 1.1/ie7.css
82 01-30-07 23:59 __MACOSX/Cutline 1.1/._ie7.css
0 09-13-06 17:30 Cutline 1.1/images/
12292 09-13-06 17:30 Cutline 1.1/images/.DS_Store
0 02-02-07 12:38 __MACOSX/Cutline 1.1/images/
82 09-13-06 17:30 __MACOSX/Cutline 1.1/images/._.DS_Store
65705 09-11-06 15:55 Cutline 1.1/images/header_1.jpg
34365 09-11-06 15:55 __MACOSX/Cutline 1.1/images/._header_1.jpg
62867 09-11-06 15:59 Cutline 1.1/images/header_2.jpg
33224 09-11-06 15:59 __MACOSX/Cutline 1.1/images/._header_2.jpg
82708 09-11-06 16:01 Cutline 1.1/images/header_3.jpg
34855 09-11-06 16:01 __MACOSX/Cutline 1.1/images/._header_3.jpg
59780 09-11-06 16:03 Cutline 1.1/images/header_4.jpg
33555 09-11-06 16:03 __MACOSX/Cutline 1.1/images/._header_4.jpg
This folder contains, among other things, thumbnails for images in the original archive. Now, this kind of unwanted, undesirable outcomes just really really annoy me. But I’ll try to keep my cool, and present a systematic analysis of not only why what Mac OSX does is wrong, but also stupid and unnecessary:
- No surprises: As a user, I don’t like surprises, specially of the bad kind. If I request to archive a directory into a Zip file, thats exactly what I want. If I later unarchive that zip file, I should get my original directory back. Nothing more, nothing less. Any kind of unintended behavior is BAD.
- We are not stupid: If I wanted you to stick in an extra folder named ”%%__MACOSX%%” in my archive, I’d let you know. Your users are a smart group, don’t insult them like this.
- I hate clutter: In my WordPress themes directory, I unzip Cutline. If each theme starts creating its own ”%%__MACOSX%%” folder, then my themes directory would soon get cluttered with needless garbage.
- It breaks things: If MacOSX did something harmless, like embed some metadata (like Zip file creator) into the Zip file itself, I might have been OK. But creating an entire tree structure in the archive just breaks things, in ways more than one. As an example, if like Cutline, each WordPress theme started creating ”%%__MACOSX%%” folders in the root of the archive, then later if I install another theme, I’ll get lots of errors and file name collissions because the new theme will also try to extract in the ”%%__MACOSX%%” folder. Not only this, some programs (like Gallery and WordPress) have the ability to load plugins/images directly from Zip files. As a result, I’ll end up with unwanted images, themes and plugins in my setup. Not only this, it might actually just break your installation. Since you did not create the ”%%__MACOSX%%” folder yourself, you don’t know what is in it, and it might not always obey the expecations of the software.
- Security: Again, you did not explicitly create that folder. What if someone creates a virus, that just modifies the default zip program on Mac to sneak in malicious payload via the ”%%__MACOSX%%” folders in any new Zip archives you create? Apart from the security risk, its a time sink. Why should I go around cleaning up mess that I did not create? Software is supposed to make my life easier, not harder.
- Redundant: From the looks of it, it seems that all of the data inside the ”%%__MACOSX%%” folder is created from the original directory. No external information is used/needed. If thats the case, why oh why would anyone EVER need this stupid new folder? If some metadata is needed, it can always be reconstructed from the original on demand. This seems downright stupid to me.
Would someone, anyone, please explain Apple’s intent and motivation behind this “feature”? What are the benefits (if any)?