sindresorhus / gulp-zip

ZIP compress files
MIT License
270 stars 47 forks source link

gulp-zip changing the folder permission from 755 to 775 present in zip file #62

Closed PrachiThengane closed 8 years ago

PrachiThengane commented 8 years ago

Task written is as below:

gulp.task('default', function () {
        return gulp.src('*')
                .pipe(zip('archive.zip'))
                .pipe(gulp.dest('./'));
});
SamVerschueren commented 8 years ago

Can you please provide more information. I'm afraid I don't entirely understand the problem from your title alone.

PrachiThengane commented 8 years ago

Hi Sam, My aim is to create a zip of Test folder and Test folder has several files and folders. gulpfile.js is present inside the Test folder.

Below are the contents of my gulpfile.js.

var gulp = require('gulp'); var zip = require('gulp-zip'); gulp.task('zipping', function () { return gulp.src('*') .pipe(zip('archive.zip')) .pipe(gulp.dest('./')); });

Before running zip task (using gulp) I have set the permissions of all files and folders to 644 and 755 respectively. This permission gets altered to 644 for files and 775 for folders after running above zipping task. Permission should remain same. How can I fix this. Am I missing anything?

sindresorhus commented 8 years ago

Seems I forgot to set the mode when creating directories. Can you try https://github.com/sindresorhus/gulp-zip/commit/864a8fd321673b2413f479610fb3a763f0e4e680?