On 8 January 2012 17:34, Larry White <ljw1001@gmail.com> wrote:
Hi Hernán,
Thank you for your help. Â Although the zips now seem to be getting created properly, Â I'm running into another problem. Â When I try to unzip them I get an error that says:
"Archive Utility Unable to expand filename.zip into "Resources". Â (Error 1 - Operation not permitted.) "
could it be that your archive contains absolute paths somehow? and then it tries to unzip it into directory with write protection (or you don't have enough privileges to write to it).
I'm running on OSX lion.
The error persists regardless of what directory I write the archive to. Â Any ideas?
thanks, larry
On Thu, Jan 5, 2012 at 9:30 AM, Hernán Morales Durand <hernan.morales@gmail.com> wrote:
| zip fileName myInputDir | myInputDir := #('Users' 'data' 'files' 'arabic') inject: '' into: [:path :suffix | path, Â FileDirectory slash , suffix]. zip := ZipArchive new. zip addTree: ( FileDirectory default fullName , myInputDir ) match: [: e | true ]. fileName := 'foo.zip'. zip writeToFileNamed: fileName.
2012/1/2 Larry White <ljw1001@gmail.com>:
zip := ZipArchive new. Â Â Â Â zipArchive addDirectory: '/Users/data/files/arabic' as: 'arabic'. fileName := 'Users/data/downloads/foo.zip'. zip writeToFileNamed: fileName.
-- Hernán Morales Information Technology Manager, Institute of Veterinary Genetics. National Scientific and Technical Research Council (CONICET). La Plata (1900), Buenos Aires, Argentina. Telephone: +54 (0221) 421-1799. Internal: 422 Fax: 425-7980 or 421-1799.
-- Best regards, Igor Stasenko.