From 94eb992e456dacf1615919b02910a2fe47242ffc Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 9 Feb 2024 17:09:16 +0100 Subject: [PATCH] Linux icon --- app/utils/resources.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/utils/resources.ts b/app/utils/resources.ts index cf615c5a..3fbfcbfd 100644 --- a/app/utils/resources.ts +++ b/app/utils/resources.ts @@ -1,14 +1,17 @@ import * as fs from 'fs'; import * as path from 'path'; -const getResourcePath = (rootPath: string) => path.resolve(__dirname, '../..', rootPath); +import { isLinux } from './process'; /** * Returns the full path of the PNG icon of the app */ export const getResourceIconPath = () => { - const stableIconPath = getResourcePath('resources/icon.png'); - if (fs.existsSync(stableIconPath)) return stableIconPath; - + if (isLinux) { + const stableIconPath = path.resolve(__dirname, '../../resources/icon.png'); + if (fs.existsSync(stableIconPath)) { + return stableIconPath; + } + } return undefined; };