HomeE-mail

Ka of Isis: When unzipping of ZIP files is undesirable

How to avoid unzipping in Mac OS X

12 February, 2011 | Filed under “Joomla!

Whenever you click on a link and download a ZIP package from a website, Mac OS X will normally decompress the package and throw the original ZIP file away. This is a nice feature and a time saver. Normally. There are, however, situations when this is not desirable. Why, you may ask. Let me give you an example.

Installation of extensions to the Joomla! content management system (CMS) is preferably performed directly on the ZIP package from within the control panel of the CMS, usually located externally on a webserver. This because uploading of each individual file from a local hard drive to the server is both time consuming and liable to suffer from corruption of files and what not. By uploading the files encapsulated in a protecting ZIP format, the transfer is faster, and only one file is involved. The CMS takes care of unzipping, no questions asked.

But, you may parry, one can simply recompress the package from the file meny in Mac OS X and upload the new ZIP file. And I would agree were it not for the world at large and Mac OS X at small. Citing the article Creating a basic Joomla! template:

“…the Finder’s ‘compress’ menu item produces a usable ZIP format package, but with one catch. It stores the files in AppleDouble format, adding extra files with names beginning with ‘._’. Thus it adds a file named ‘._templateDetails.xml’, which Joomla 1.5.x can sometimes misinterpret. The symptom is an error message, XML Parsing Error at 1:1. Error 4: Empty document.”

The article continues with a description of how to recompress via the Terminal to avoid the problem. As stated repeatedly here on my own site, the Terminal gives me the creeps, sending me off to all corners of the world in quest of different solutions. In this case, the problem is easy to avoid in the first place, and I will waste no time in dealing the card.

Details below are given for Safari, the best browser out there:

  1. Do not left-click on the linked ZIP file
  2. Instead, right-click on the link and choose Copy Link (see figure 1)
  3. Choose Window > Downloads to open the Downloads window
  4. Choose Edit > Paste (aka Cmnd-V)
  5. Wait while the file is downloaded (see figure 2)
  6. Open the browser's download folder, and there, unzipped, is the file of interest

Copy link in Mac OS X

Fig. 1. Right-click to copy link address.

The Download window in Safari

Fig. 2. The unzipped file in the Downloads window.

  Leave a comment