diff --git a/main.js b/main.js index e7f41db..5e4c623 100644 --- a/main.js +++ b/main.js @@ -58,6 +58,17 @@ ipcMain.on('download', (e, args) => { dlDir = app.getPath('downloads'); fullFile = dlDir + "/" + filename; + //Special case for handling the build that is from master. This is ALWAYS downloaded as there's no way of telling when it was last updated. + if(filename == "master.hex" || filename == "master.ini") + { + if(fs.existsSync(fullFile)) + { + fs.unlinkSync(fullFile) + console.log('Master version selected, removing local file forcing re-download: ' + filename); + } + + } + //console.log("Filename: " + fullFile ); fs.exists(fullFile, (exists) => { diff --git a/package.json b/package.json index 16a3dfd..6cf09dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "SpeedyLoader", - "version": "1.0.1", + "version": "1.1.0", "description": "Speeduino universal firmware loader", "main": "main.js", "scripts": {