Giter Site home page Giter Site logo

Comments (19)

dduponchel avatar dduponchel commented on May 25, 2024

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.

adam-lynch avatar adam-lynch commented on May 25, 2024

@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.

dduponchel avatar dduponchel commented on May 25, 2024

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.

adam-lynch avatar adam-lynch commented on May 25, 2024

Thanks @dduponchel 😄

from gulp-zip.

adam-lynch avatar adam-lynch commented on May 25, 2024

I don't understand why this is closed. It's not fixed or anything.

from gulp-zip.

sindresorhus avatar sindresorhus commented on May 25, 2024

I think I closed the wrong issue. Sorry.

from gulp-zip.

adam-lynch avatar adam-lynch commented on May 25, 2024

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.

kevva avatar kevva commented on May 25, 2024

@adam-lynch, could you try my fork https://github.com/kevva/gulp-zip/tree/yazl?

from gulp-zip.

brian-mann avatar brian-mann commented on May 25, 2024

@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.

adam-lynch avatar adam-lynch commented on May 25, 2024

@kevva sorry, didn't see your reply 'til now. I might be able to later.

from gulp-zip.

brian-mann avatar brian-mann commented on May 25, 2024

@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.

adam-lynch avatar adam-lynch commented on May 25, 2024

Looks like it's sorted in jszip; Stuk/jszip#200

from gulp-zip.

brian-mann avatar brian-mann commented on May 25, 2024

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.

dduponchel avatar dduponchel commented on May 25, 2024

@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.

brian-mann avatar brian-mann commented on May 25, 2024

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.

dduponchel avatar dduponchel commented on May 25, 2024

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.

dduponchel avatar dduponchel commented on May 25, 2024

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.

dduponchel avatar dduponchel commented on May 25, 2024

I pushed updated code for JSZip and gulp-zip on git branches :

This version should generate 775 folders and keep the original file mode. Could you check if that fix your issue ?

from gulp-zip.

adam-lynch avatar adam-lynch commented on May 25, 2024

Confirmed that it's fixed as of 3.0.1 😄

from gulp-zip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.