Compare commits

...

2 Commits

@ -29,7 +29,11 @@ function doRead(handle, length) {
}).then((result) => { }).then((result) => {
if (result.bytesRead === 0) { if (result.bytesRead === 0) {
// Not documented; https://github.com/nodejs/node/issues/35363 // Not documented; https://github.com/nodejs/node/issues/35363
throw new EndOfStream(); return Promise.try(() => {
return handle.close();
}).then(() => {
throw new EndOfStream();
});
} else if (result.bytesRead === length) { } else if (result.bytesRead === length) {
return buffer; return buffer;
} else if (result.bytesRead < length) { } else if (result.bytesRead < length) {

@ -1,6 +1,6 @@
{ {
"name": "@promistream/read-file", "name": "@promistream/read-file",
"version": "0.1.1", "version": "0.1.2",
"main": "index.js", "main": "index.js",
"keywords": [ "keywords": [
"promistream" "promistream"

Loading…
Cancel
Save