diff --git a/.gitignore b/.gitignore index 24d60a0..7f50751 100755 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ dev* test/* esptool .firmware/* +yarn.lock diff --git a/CHANGES.md b/CHANGES.md index b7f043d..473e4fd 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,9 +1,12 @@ +### 2.0.4 ### +* Bugfix: Download command failed because of API changes in NodeMCU Firmware **v1.5.4** - thanks to [verneroberts on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/pull/24) #42 + ### 2.0.3 ### -Bugfix: Terminal in **non-TTY** mode caused fatal error on connect - thanks to [stephanMettler on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/issues/23) #23 +* Bugfix: Terminal in **non-TTY** mode caused fatal error on connect - thanks to [stephanMettler on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/issues/23) #23 ### 2.0.2 ### -Bugfix: Upload command failed because of API changes in NodeMCU Firmware **v1.5.4** - thanks to [curioussavage on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/issues/22) ##2 -Bugfix: Fix crash when trying to upload a folder - thanks to [sakisds on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/pull/20) #20 +* Bugfix: Upload command failed because of API changes in NodeMCU Firmware **v1.5.4** - thanks to [curioussavage on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/issues/22) #22 +* Bugfix: Fix crash when trying to upload a folder - thanks to [sakisds on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/pull/20) #20 ### 2.0.1 ### * Bugfix: `devices` command was broken since the last release (refactoring issue) - thanks to [otbe on GitHub](https://github.com/AndiDittrich/NodeMCU-Tool/issues/18) #18 diff --git a/lib/NodeMcuConnector.js b/lib/NodeMcuConnector.js index 46d10a7..4077b0f 100755 --- a/lib/NodeMcuConnector.js +++ b/lib/NodeMcuConnector.js @@ -456,7 +456,7 @@ NodeMcuConnector.prototype.executeCommand = function(cmd, cb){ NodeMcuConnector.prototype.download = function(remoteName, cb){ // check connect flag if (!this.isConnected){ - cb('Cannot upload file - device offline', null); + cb('Cannot download file - device offline', null); return; } @@ -471,7 +471,7 @@ NodeMcuConnector.prototype.download = function(remoteName, cb){ // open remote file for write this.device.executeCommand(_luaCommandBuilder.prepare('fileOpen', [remoteName, 'r']), function(err, echo, response){ // successful opened ? - if (err || response != 'true'){ + if (err || response == 'nil'){ cb('Cannot open remote file "' + remoteName + '" for read - ' + err); return; } diff --git a/package.json b/package.json index 389411d..fd4ae54 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodemcu-tool", - "version": "2.0.3", + "version": "2.0.4", "description": "Command line tool to upload and manage files on your NodeMCU / ESP8266 Module.", "keywords": [ "cli",