From 0dcf344c0f9c6a0777e31fe393f0087f666164c5 Mon Sep 17 00:00:00 2001 From: Quentin Decaunes Date: Fri, 8 Mar 2019 09:01:15 +0100 Subject: [PATCH] Fixed an issue where the shortcut wouldn't update. --- js/methods.js | 22 ++++++++++------------ package.json | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/js/methods.js b/js/methods.js index 5dcec87..df7b647 100644 --- a/js/methods.js +++ b/js/methods.js @@ -294,18 +294,16 @@ function recreateShortcut() { let fs = require('fs'); try { var shortcut_path = app.getPath('desktop') + "\\Ryzen Controller"; - if (!fs.existsSync(shortcut_path)) { - fs.unlink(shortcut_path, console.log); - fs.symlink(app.getPath('exe'), shortcut_path, function (err) { - if (err) { - notification("danger", "Shortcut can't be created, please check log tabs for more info."); - appendLog(`recreateShortcut(): ${err}`); - } - else { - notification('primary', "A shortcut has been created on desktop."); - } - }); - } + fs.unlink(shortcut_path, console.log); + fs.symlink(app.getPath('exe'), shortcut_path, function (err) { + if (err) { + notification("danger", "Shortcut can't be created, please check log tabs for more info."); + appendLog(`recreateShortcut(): ${err}`); + } + else { + notification('primary', "A shortcut has been created on desktop."); + } + }); } catch (error) { appendLog(`recreateShortcut() ${error}`); } diff --git a/package.json b/package.json index cb38059..5e7cda6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ryzencontroller", "productName": "RyzenController", - "version": "1.6.0", + "version": "1.6.1", "description": "A minimal Electron application to use ryzenAdj through a friendly interface.", "main": "main.js", "scripts": {