Comments (19)
The underlying library, JSZip, creates zip files without any metadata (like the UNIX rights). After extraction, you will likely get files with 644
permissions.
from gulp-zip.
@dduponchel hmm yeah, so I guess this is unexpected behaviour. Someone correct me if I'm wrong.
By the way, when I'm extracting using Finder, Finder must be somehow making up for the lack of metadata, right? Like, it must be finding and marking executables within (or even the entire contents) as 777
or something. Not really making a point here, just wondering.
from gulp-zip.
The field "made by" is set to "DOS" : the archive manager knows that there won't be any useful metadata so it usually creates files with the default rights (I tested with unzip on linux). I never played with Finder, it may have a different behavior (like checking if the file is a .app
).
I created a feature request on JSZip side, see Stuk/jszip#194.
from gulp-zip.
Thanks @dduponchel 😄
from gulp-zip.
I don't understand why this is closed. It's not fixed or anything.
from gulp-zip.
I think I closed the wrong issue. Sorry.
from gulp-zip.
No prob :)
On Tue, 13 Jan 2015 18:00 Sindre Sorhus [email protected] wrote:
I think I closed the wrong issue. Sorry.
—
Reply to this email directly or view it on GitHub
#38 (comment)
.
from gulp-zip.
@adam-lynch, could you try my fork https://github.com/kevva/gulp-zip/tree/yazl?
from gulp-zip.
@adam-lynch I'm getting the exact same problem, and I can tell you're using this on node-webkit
😉
Swapping out to the yazl
fork does indeed seem to fix the issue.
from gulp-zip.
@kevva sorry, didn't see your reply 'til now. I might be able to later.
from gulp-zip.
@adam-lynch @kevva Actually nevermind, this fork is blowing up when I try to zip up my app.
buffer.js:176
this.length = +subject > 0 ? Math.ceil(subject) : 0;
^
RangeError: Maximum call stack size exceeded
from gulp-zip.
Looks like it's sorted in jszip; Stuk/jszip#200
from gulp-zip.
Nope. Still cannot get zipping to work even on that commit.
It zips just fine, and unzips just fine (from the terminal) but after unzipping and trying to open my app it gives me:
LSOpenURLsWithRole() failed with error -10810 for the file
from gulp-zip.
@brian-mann after unzipping, what permissions do you have on the file ?
JSZip will need two things in your case : unixPermissions:{executable:true}
when adding the file and platform:"UNIX"
when generating the zip file.
from gulp-zip.
I spent about 6 hours today working with every zip library for node. The only one that has worked was using https://github.com/thejoshwolfe/yazl
No permission issues, zipping issues, or unzipping issues. Using it directly what the only way I could get anything to work.
from gulp-zip.
I can't test it (I don't have OSX) but a search on your error indicates that a chmod a+x
of the file before zipping it could solve the issue (so an issue with the file mode inside the zip), hence my question :)
JSZip generates now a 755 file inside the zip when asked to : from what I understand it should be enough. Yazl re-uses the exising file mode : what do you have for the app file ?
Using JSZip, could you confirm that, when extracted, the app file mode is 755 ? And check if your test still fail.
from gulp-zip.
I just checked with a trainee with a mac at work, the inside of its apps have a umask of 002
: the files are 664
, the folders are 775
(some even in 777
). I'll do like yazl and reuse directly the mode.
from gulp-zip.
I pushed updated code for JSZip and gulp-zip on git branches :
- jszip on https://github.com/dduponchel/jszip/tree/wip_unix_mode
- gulp-zip on https://github.com/dduponchel/gulp-zip/tree/wip_unix_mode (which depends on the jszip branch)
This version should generate 775
folders and keep the original file mode. Could you check if that fix your issue ?
from gulp-zip.
Confirmed that it's fixed as of 3.0.1 😄
from gulp-zip.
Related Issues (20)
- Replace gulp util
- Changelog HOT 1
- Feature Request: support Yazl's `options.mtime` to enable creating byte-for-byte identical zip archives across rebuilds HOT 2
- readable-stream throws error when using gulp-zip HOT 1
- Can't open zip on Mac OS HOT 7
- Unable to zip Windows "Junction" folders.
- yazl 2.5.0 broke gulp-zip HOT 1
- How to use the options configuration object HOT 1
- gulp-util removal request HOT 1
- gulp-zip change folder permission, from 755 to 666 HOT 6
- Can't install w/ npm HOT 1
- Remove gulp peer dependency? HOT 3
- Files without name are ignored during zip (e.g. ".txt") HOT 2
- yazl TypeError: jsDate.getDate is not a function when setting modfiedTime HOT 1
- How tooutput zip into source directory?
- Request: Add more examples to documentation HOT 3
- Won't zip if folder name contains [square brackets] HOT 2
- FEATURE REQUEST: zip files recursively HOT 1
- Append files to existing zip HOT 1
- Deprecation of Gulp-util HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-zip.