mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 18:13:28 +07:00
Fixed an issue where the shortcut wouldn't update.
This commit is contained in:
parent
e3a84c0feb
commit
0dcf344c0f
@ -294,18 +294,16 @@ function recreateShortcut() {
|
|||||||
let fs = require('fs');
|
let fs = require('fs');
|
||||||
try {
|
try {
|
||||||
var shortcut_path = app.getPath('desktop') + "\\Ryzen Controller";
|
var shortcut_path = app.getPath('desktop') + "\\Ryzen Controller";
|
||||||
if (!fs.existsSync(shortcut_path)) {
|
fs.unlink(shortcut_path, console.log);
|
||||||
fs.unlink(shortcut_path, console.log);
|
fs.symlink(app.getPath('exe'), shortcut_path, function (err) {
|
||||||
fs.symlink(app.getPath('exe'), shortcut_path, function (err) {
|
if (err) {
|
||||||
if (err) {
|
notification("danger", "Shortcut can't be created, please check log tabs for more info.");
|
||||||
notification("danger", "Shortcut can't be created, please check log tabs for more info.");
|
appendLog(`recreateShortcut(): ${err}`);
|
||||||
appendLog(`recreateShortcut(): ${err}`);
|
}
|
||||||
}
|
else {
|
||||||
else {
|
notification('primary', "A shortcut has been created on desktop.");
|
||||||
notification('primary', "A shortcut has been created on desktop.");
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
appendLog(`recreateShortcut() ${error}`);
|
appendLog(`recreateShortcut() ${error}`);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ryzencontroller",
|
"name": "ryzencontroller",
|
||||||
"productName": "RyzenController",
|
"productName": "RyzenController",
|
||||||
"version": "1.6.0",
|
"version": "1.6.1",
|
||||||
"description": "A minimal Electron application to use ryzenAdj through a friendly interface.",
|
"description": "A minimal Electron application to use ryzenAdj through a friendly interface.",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Loading…
Reference in New Issue
Block a user