diff --git a/agents/meshcore.js b/agents/meshcore.js index 547b2f08..809057ad 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -4114,7 +4114,7 @@ function agentUpdate_Start(updateurl, updateoptions) { agentUpdate_Start._selfupdate = null; }); agentUpdate_Start._selfupdate.on('response', function (img) { - this._file = require('fs').createWriteStream(agentfilename + (process.platform == 'win32' ? '.update.exe' : 'update'), { flags: 'wb' }); + this._file = require('fs').createWriteStream(agentfilename + (process.platform == 'win32' ? '.update.exe' : '.update'), { flags: 'wb' }); this._filehash = require('SHA384Stream').create(); this._filehash.on('hash', function (h) { if (updateoptions != null && updateoptions.hash != null) { diff --git a/agents/recoverycore.js b/agents/recoverycore.js index 566378b0..f8b0207e 100644 --- a/agents/recoverycore.js +++ b/agents/recoverycore.js @@ -417,7 +417,7 @@ function agentUpdate_Start(updateurl, updateoptions) { agentUpdate_Start._selfupdate = null; }); agentUpdate_Start._selfupdate.on('response', function (img) { - this._file = require('fs').createWriteStream(agentfilename + (process.platform=='win32'?'.update.exe':'update'), { flags: 'wb' }); + this._file = require('fs').createWriteStream(agentfilename + (process.platform=='win32'?'.update.exe':'.update'), { flags: 'wb' }); this._filehash = require('SHA384Stream').create(); this._filehash.on('hash', function (h) { if (updateoptions != null && updateoptions.hash != null) {