diff --git a/lib/sftp.js b/lib/sftp.js index 4f814c97..b75c68bf 100644 --- a/lib/sftp.js +++ b/lib/sftp.js @@ -2728,6 +2728,8 @@ function ReadStream(sftp, path, options) { // For backwards compat do not emit close on destroy. options.emitClose = false; + // Fix error No such file. + options.autoDestroy = false; ReadableStream.call(this, options); @@ -2926,6 +2928,8 @@ function WriteStream(sftp, path, options) { // For backwards compat do not emit close on destroy. options.emitClose = false; + // Fix error No such file. + options.autoDestroy = false; WritableStream.call(this, options); diff --git a/package.json b/package.json index e56879b5..1e398078 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ssh2-streams", - "version": "0.4.10", + "version": "0.4.11", "author": "Brian White ", "description": "SSH2 and SFTP(v3) client/server protocol streams for node.js", "main": "./index",