Skip to content

Commit

Permalink
set mode for directories too - fixes #62
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jan 11, 2016
1 parent 0772bea commit 864a8fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ module.exports = function (filename, opts) {

if (file.isNull() && file.stat && file.stat.isDirectory && file.stat.isDirectory()) {
zip.addEmptyDirectory(pathname, {
mtime: file.stat.mtime || new Date()
mtime: file.stat.mtime || new Date(),
mode: file.stat.mode
});
} else {
zip.addBuffer(file.contents, pathname, {
Expand Down

0 comments on commit 864a8fd

Please sign in to comment.