From 045db9ba918ce82bc4922c476f52973658952ae4 Mon Sep 17 00:00:00 2001 From: Oj Date: Wed, 12 Jan 2022 15:15:16 +0000 Subject: [PATCH] [Index] Fix system electron support not working for non-default Electron version installed --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 41de9e6..cde1e71 100644 --- a/src/index.js +++ b/src/index.js @@ -5,7 +5,7 @@ global.oaVersion = 'nightly'; log('Init', 'OpenAsar v' + oaVersion); log('Init', 'Resources Path:', process.resourcesPath); -if (process.resourcesPath === '/usr/lib/electron/resources') { // Using system electron, fix process.resourcesPath +if (process.resourcesPath.startsWith('/usr/lib/electron')) { // Using system electron, fix process.resourcesPath log('Init', 'Detected System Electron, fixing paths'); global.systemElectron = true; @@ -38,4 +38,4 @@ if (appMode === 'overlay-host') { const bootstrap = require('./bootstrap'); bootstrap(); // Start bootstrap -} \ No newline at end of file +}