zip-stream
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -26,3 +26,3 @@ /** | ||
this.on('end', function() { | ||
this.once('end', function() { | ||
this.digest = this.checksum.digest(); | ||
@@ -29,0 +29,0 @@ }); |
@@ -44,3 +44,3 @@ /** | ||
var year = (utc === true) ? d.getUTCFullYear() : d.getFullYear(); | ||
var year = utc ? d.getUTCFullYear() : d.getFullYear(); | ||
@@ -53,7 +53,7 @@ if (year < 1980) { | ||
year: year, | ||
month: (utc === true) ? d.getUTCMonth() : d.getMonth(), | ||
date: (utc === true) ? d.getUTCDate() : d.getDate(), | ||
hours: (utc === true) ? d.getUTCHours() : d.getHours(), | ||
minutes: (utc === true) ? d.getUTCMinutes() : d.getMinutes(), | ||
seconds: (utc === true) ? d.getUTCSeconds() : d.getSeconds() | ||
month: utc ? d.getUTCMonth() : d.getMonth(), | ||
date: utc ? d.getUTCDate() : d.getDate(), | ||
hours: utc ? d.getUTCHours() : d.getHours(), | ||
minutes: utc ? d.getUTCMinutes() : d.getMinutes(), | ||
seconds: utc ? d.getUTCSeconds() : d.getSeconds() | ||
}; | ||
@@ -70,13 +70,4 @@ | ||
util.sanitizePath = function() { | ||
var filepath = util.unixifyPath.apply(util, arguments); | ||
if (filepath === '.') { | ||
filepath = ''; | ||
} | ||
while (filepath.substring(0, 1) === '/') { | ||
filepath = filepath.substring(1); | ||
} | ||
return filepath; | ||
var filepath = path.join.apply(path, arguments); | ||
return filepath.replace(/\\/g, '/').replace(/:/g, '').replace(/^\/+/, ''); | ||
}; | ||
@@ -83,0 +74,0 @@ |
@@ -154,3 +154,3 @@ /** | ||
type: 'file', | ||
name: '', | ||
name: null, | ||
date: null, | ||
@@ -161,3 +161,5 @@ store: false, | ||
data.name = util.sanitizePath(data.name); | ||
if (data.name) { | ||
data.name = util.sanitizePath(data.name); | ||
} | ||
@@ -164,0 +166,0 @@ if (typeof data.lastModifiedDate !== 'number') { |
{ | ||
"name": "zip-stream", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "a streaming zip generator.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/ctalkington/node-zip-stream", |
@@ -1,2 +0,2 @@ | ||
# zip-stream v0.1.2 [![Build Status](https://secure.travis-ci.org/ctalkington/node-zip-stream.png?branch=master)](http://travis-ci.org/ctalkington/node-zip-stream) | ||
# zip-stream v0.1.3 [![Build Status](https://secure.travis-ci.org/ctalkington/node-zip-stream.png?branch=master)](http://travis-ci.org/ctalkington/node-zip-stream) | ||
@@ -3,0 +3,0 @@ zip-stream is a streaming zip generator. It was built to be a successor to [zipstream](https://npmjs.org/package/zipstream). Dependencies are kept to a minimum through the use of many of node's built-in modules including the use of zlib module for compression. |
@@ -125,2 +125,4 @@ /*global before,describe,it */ | ||
assert.equal(utils.sanitizePath('\\this/path//file.txt'), 'this/path/file.txt'); | ||
assert.equal(utils.sanitizePath('/this/path/file.txt'), 'this/path/file.txt'); | ||
assert.equal(utils.sanitizePath('c:\\this\\path\\file.txt'), 'c/this/path/file.txt'); | ||
}); | ||
@@ -127,0 +129,0 @@ }); |
Sorry, the diff of this file is not supported yet
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
58490
1021