Skip to content

Commit

Permalink
Remove err parameter from onComplete() to keep it consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
thgeorgiou committed Nov 30, 2016
1 parent 3def68c commit 1a4fccf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/NodeMCU-Tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Tool.upload = function(localFiles, options, onProgess){
// check if file is directory
if (fileInfo.isDirectory()) {
_mculogger.error('Path "' + localFile + '" is a directory.');
onComplete(1);
onComplete();
return;
}

Expand Down Expand Up @@ -242,12 +242,12 @@ Tool.upload = function(localFiles, options, onProgess){
var remoteFile = options.remotename ? options.remotename : (options.keeppath ? localFile : _path.basename(localFile));

// start single file upload
uploadFile(connector, localFile, remoteFile, function(err){
uploadFile(connector, localFile, remoteFile, function(){
// close connection
connector.disconnect();

// log message
if (!err) _logger.log('File Transfer complete!');
_logger.log('File Transfer complete!');
});

// bulk upload ?
Expand Down

0 comments on commit 1a4fccf

Please sign in to comment.