mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 18:13:28 +07:00
Fixes RYZEN-CONTROLLER-12 - Better detection of wrong path for askingForRyzenAdjExecutablePath().
This commit is contained in:
parent
5277c9938b
commit
a7b0362f0f
@ -215,11 +215,18 @@ function askingForRyzenAdjExecutablePath() {
|
|||||||
var remote = require('electron').remote;
|
var remote = require('electron').remote;
|
||||||
var dialog = remote.require('electron').dialog;
|
var dialog = remote.require('electron').dialog;
|
||||||
|
|
||||||
var path = dialog.showOpenDialog({
|
dialog.showOpenDialog({
|
||||||
properties: ['openFile']
|
properties: ['openFile']
|
||||||
}, function (filePaths) {
|
}, function (filePaths) {
|
||||||
if (typeof filePaths[0] !== 'undefined') {
|
|
||||||
const settings = require('electron-settings');
|
const settings = require('electron-settings');
|
||||||
|
if (typeof filePaths === 'undefined') {
|
||||||
|
notification('warning', 'No path given, nothing changed.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (typeof filePaths[0] === 'undefined') {
|
||||||
|
notification('warning', 'No path given, nothing changed.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
settings.set("settings",
|
settings.set("settings",
|
||||||
Object.assign(
|
Object.assign(
|
||||||
@ -231,9 +238,6 @@ function askingForRyzenAdjExecutablePath() {
|
|||||||
|
|
||||||
notification('primary', 'Path to ryzenAdj executable has been saved.');
|
notification('primary', 'Path to ryzenAdj executable has been saved.');
|
||||||
appendLog(`askingForRyzenAdjExecutablePath(): ${filePaths[0]}`);
|
appendLog(`askingForRyzenAdjExecutablePath(): ${filePaths[0]}`);
|
||||||
} else {
|
|
||||||
notification('warning', 'No path given, nothing changed.');
|
|
||||||
}
|
|
||||||
preFillSettings();
|
preFillSettings();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user