gruntjs / grunt-contrib-compress

Compress files and folders.
http://gruntjs.com/
MIT License
345 stars 114 forks source link

cwd not working with zip #83

Closed cniaulin closed 10 years ago

cniaulin commented 10 years ago

I didn't succeed using cwd option. Here is my use case:

options: { archive: toto.zip, mode: 'zip' }, files: [{ expland: true, cwd: '', src: ['/folder/subFolder/toto.app/**'] } ]

-> ok I get an archive toto.zip and when extracted I get /folder/subFolder/toto.app

options: { archive: toto.zip, mode: 'zip' }, files: [{ expland: true, cwd: '/folder/subFolder/', src: ['toto.app/**'] } ]

-> I get a broken archive

Am I doing something wrong ? Is it something wrong with cwd and

ctalkington commented 10 years ago

cwd prob shouldnt start with a slash.

jamesplease commented 10 years ago

cwd prob shouldnt start with a slash.

My thoughts, too. Also this question is better suited for StackOverflow.