Comparing version 0.14.1 to 0.14.2
@@ -385,11 +385,5 @@ /** | ||
dirpath = util.sanitizePath(dirpath); | ||
dirpath = util.trailingSlashIt(dirpath); | ||
if (typeof destpath === 'string') { | ||
destpath = util.sanitizePath(destpath); | ||
destpath = destpath === '' ? '' : util.trailingSlashIt(destpath); | ||
} else if (destpath === false) { | ||
if (destpath === false) { | ||
destpath = ''; | ||
} else { | ||
} else if (typeof destpath !== 'string'){ | ||
destpath = dirpath; | ||
@@ -410,3 +404,3 @@ } | ||
var entryData = util._.extend({}, data); | ||
entryData.name = destpath + file.relative; | ||
entryData.name = util.sanitizePath(destpath, file.relative); | ||
entryData.stats = file.stats; | ||
@@ -413,0 +407,0 @@ |
@@ -108,5 +108,2 @@ /** | ||
dirpath = util.sanitizePath(dirpath); | ||
dirpath = util.trailingSlashIt(dirpath); | ||
if (typeof base === 'function') { | ||
@@ -120,2 +117,3 @@ callback = base; | ||
var file; | ||
var filepath; | ||
@@ -133,6 +131,8 @@ if (err) { | ||
fs.stat(dirpath + file, function (err, stats) { | ||
filepath = path.join(dirpath, file); | ||
fs.stat(filepath, function(err, stats) { | ||
results.push({ | ||
path: dirpath + file, | ||
relative: path.relative(base, dirpath + file).replace(/\\/g, '/'), | ||
path: filepath, | ||
relative: path.relative(base, filepath).replace(/\\/g, '/'), | ||
stats: stats | ||
@@ -142,3 +142,3 @@ }); | ||
if (stats && stats.isDirectory()) { | ||
util.walkdir(dirpath + file, base, function(err, res) { | ||
util.walkdir(filepath, base, function(err, res) { | ||
results = results.concat(res); | ||
@@ -145,0 +145,0 @@ next(); |
{ | ||
"name": "archiver", | ||
"version": "0.14.1", | ||
"version": "0.14.2", | ||
"description": "a streaming interface for archive generation", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/ctalkington/node-archiver", |
@@ -1,2 +0,2 @@ | ||
# Archiver v0.14.1 [![Build Status](https://travis-ci.org/ctalkington/node-archiver.svg?branch=master)](https://travis-ci.org/ctalkington/node-archiver) | ||
# Archiver v0.14.2 [![Build Status](https://travis-ci.org/ctalkington/node-archiver.svg?branch=master)](https://travis-ci.org/ctalkington/node-archiver) | ||
@@ -3,0 +3,0 @@ a streaming interface for archive generation |
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
38013
890