Skip to content

Commit

Permalink
Always force download of the master files if that is selected. Bump t…
Browse files Browse the repository at this point in the history
…o version 1.1
  • Loading branch information
noisymime committed Feb 11, 2019
1 parent 85495d2 commit f6c4aa7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SpeedyLoader",
"version": "1.0.1",
"version": "1.1.0",
"description": "Speeduino universal firmware loader",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit f6c4aa7

Please sign in to comment.