What causes zip to use error codes that don't match the man page?
Hi All,
I have a script that runs a zip command similar to the following:
/usr/bin/zip -9oTr -lf "/var/folders/kv/pq58fps946n9tbkpc9wjsgy40000gn/T/Backup_zip.log" "/Volumes/LaCie Backup/System HD:Folder/Main Catalog/Backups/Config-20130108_141353.zip" ./Preferences/com.adobe.*.plist "./Application Support/Adobe"> "/var/folders/kv/pq58fps946n9tbkpc9wjsgy40000gn/T-2" 2>&1
As you can see it uses the standard zip distributed with the OS.
Sometimes the zip command returns values that are not possible, at least according to the man page. zip can return values of 0 to 19. Because I am using the test argument I also might receive unzip return values, which can be between 0 to 82.
In a recent example an error code of 4608 was returned, which is no where near the range of return code values that should be possible. The log file did include some errors such as follows:
zip warning: name not matched: ./Preferences/com.Adobe.Common.plist
zip warning: Permission denied
zip warning: could not open for reading: Application Support/Adobe/Lightroom/Modules/AutopanoGiga3.lrplugin/Contents/MacOS/Lightroom Plugin_mac
zip warning: Not all files were readable
So obviously there were some issues but I'm hoping to decipher the error code to get a deeper understanding of what is going on here. And to allow me to update the script to respond appropriately when errors occur.
Can someone please suggest the best way to interpret these "out of range" return codes from the zip command? I'd prefer to sitck with the default zip distribution because this isn't the only system I use the script on.
Thanks,
Matt
MacBook Air, Mac OS X (10.7.4)