jscrambler
Advanced tools
Comparing version 0.5.2 to 0.5.3
@@ -9,2 +9,3 @@ /** | ||
var _ = require('lodash'); | ||
var fs = require('fs-extra'); | ||
@@ -258,2 +259,3 @@ var glob = require('glob'); | ||
var zip = new JSZip(zipFile); | ||
var size = _.size(zip.files); | ||
for (var file in zip.files) { | ||
@@ -265,3 +267,10 @@ if (!zip.files[file].options.dir) { | ||
} else if (dest) { | ||
fs.outputFileSync(path.join(dest, file), buffer); | ||
var lastDestChar = dest[dest.length - 1]; | ||
var destPath; | ||
if (size === 1 && lastDestChar !== '/' && lastDestChar !== '\\') { | ||
destPath = dest; | ||
} else { | ||
destPath = path.join(dest, file); | ||
} | ||
fs.outputFileSync(destPath, buffer); | ||
} | ||
@@ -268,0 +277,0 @@ } |
{ | ||
"name": "jscrambler", | ||
"description": "JScrambler API client.", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"homepage": "https://github.com/auditmark/node-jscrambler", | ||
@@ -6,0 +6,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25387
462