Socket
Socket
Sign inDemoInstall

extract-zip

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extract-zip - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

17

index.js

@@ -60,7 +60,20 @@ var fs = require('fs')

var mode = (entry.externalFileAttributes >> 16) & 0xFFFF
// check if it's a symlink (using stat mode constants)
// check if it's a symlink or dir (using stat mode constants)
var IFMT = 61440
var IFDIR = 16384
var IFLNK = 40960
var symlink = (mode & IFMT) === IFLNK
var isDir = (mode & IFMT) === IFDIR
// if no mode then default to readable
if (mode === 0) {
if (isDir) mode = 0555
else mode = 0444
}
// reverse umask first (~)
var umask = ~process.umask()
// & with processes umask to override invalid perms
var procMode = mode & umask
zipfile.openReadStream(entry, function(err, readStream) {

@@ -89,3 +102,3 @@ if (err) {

function writeStream() {
var writeStream = fs.createWriteStream(dest, {mode: mode})
var writeStream = fs.createWriteStream(dest, {mode: procMode})
readStream.pipe(writeStream)

@@ -92,0 +105,0 @@ writeStream.on('finish', function() {

2

package.json
{
"name": "extract-zip",
"version": "1.0.2",
"version": "1.0.3",
"description": "unzip a zip file into a directory using 100% pure gluten-free organic javascript",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc