Fixed platform detection.

This commit is contained in:
Quentin Decaunes 2019-03-12 20:04:02 +01:00
parent 7ec6cb2032
commit cdc6455a79
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ ready(function(){
displayVersion();
reApplyPeriodically(require('electron-settings').get('settings.reapply_periodically'));
displayOptionDescription();
if (require('os').platform === 'win32') {
if (require('os').platform() === 'win32') {
recreateShortcut();
}
updatePresetList();

View File

@ -66,7 +66,7 @@ function registerRepeaterForAllInput() {
* Will display a warning if not.
*/
function checkForAdminRights() {
if (require('os').platform !== 'win32') {
if (require('os').platform() !== 'win32') {
const isRoot = process.getuid && process.getuid() === 0;
if (!isRoot) {
notification('danger',
@ -108,7 +108,7 @@ function notification(type, message) {
function getRyzenAdjExecutablePath() {
const settings = require('electron-settings');
var ryzen_adj_path = settings.get('settings.ryzen_adj_path');
if (!ryzen_adj_path && require('os').platform === 'win32') {
if (!ryzen_adj_path && require('os').platform() === 'win32') {
ryzen_adj_path = getCurrentWorkingDirectory() + "\\bin\\ryzenadj.exe";
}
appendLog(`getRyzenAdjExecutablePath(): "${ryzen_adj_path}"`);