Comparing version
@@ -322,2 +322,6 @@ var fs = require("fs"); | ||
function readFdSlicerNoEof(fdSlicer, buffer, offset, length, position, callback) { | ||
if (length === 0) { | ||
// fs.read will throw an out-of-bounds error if you try to read 0 bytes from a 0 byte file | ||
return setImmediate(function() { callback(null, new Buffer(0)); }); | ||
} | ||
fdSlicer.read(buffer, offset, length, position, function(err, bytesRead) { | ||
@@ -324,0 +328,0 @@ if (err) return callback(err); |
{ | ||
"name": "yauzl", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "yet another unzip library for node", | ||
@@ -14,3 +14,7 @@ "main": "index.js", | ||
"keywords": [ | ||
"unzip" | ||
"unzip", | ||
"zip", | ||
"stream", | ||
"archive", | ||
"file" | ||
], | ||
@@ -17,0 +21,0 @@ "author": "Josh Wolfe <thejoshwolfe@gmail.com>", |
25314
0.98%351
1.15%