Compare commits

...

2 Commits

@ -29,7 +29,11 @@ function doRead(handle, length) {
}).then((result) => {
if (result.bytesRead === 0) {
// 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) {
return buffer;
} else if (result.bytesRead < length) {

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

Loading…
Cancel
Save