From f6c4aa7c7e0271e3402e692bb0b2e2b615283df9 Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Tue, 12 Feb 2019 10:10:32 +1100 Subject: [PATCH] Always force download of the master files if that is selected. Bump to version 1.1 --- main.js | 11 +++++++++++ package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) 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": {