From 7946ff63ae12025c7c0e6a7bc07635f3594e3c42 Mon Sep 17 00:00:00 2001 From: Natsumi Date: Fri, 1 Aug 2025 16:56:16 +1200 Subject: [PATCH] Linux: Fix missing icon error --- src-electron/main.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src-electron/main.js b/src-electron/main.js index 12b34d09..28e9a631 100644 --- a/src-electron/main.js +++ b/src-electron/main.js @@ -184,16 +184,20 @@ ipcMain.handle('app:restart', () => { ipcMain.handle('app:getWristOverlayWindow', () => { if (wristOverlayWindow && wristOverlayWindow.webContents) { - return !wristOverlayWindow.webContents.isLoading() && - wristOverlayWindow.webContents.isPainting(); + return ( + !wristOverlayWindow.webContents.isLoading() && + wristOverlayWindow.webContents.isPainting() + ); } return false; }); ipcMain.handle('app:getHmdOverlayWindow', () => { if (hmdOverlayWindow && hmdOverlayWindow.webContents) { - return !hmdOverlayWindow.webContents.isLoading() && - hmdOverlayWindow.webContents.isPainting(); + return ( + !hmdOverlayWindow.webContents.isLoading() && + hmdOverlayWindow.webContents.isPainting() + ); } return false; }); @@ -611,6 +615,10 @@ async function createDesktopFile() { // Download the icon and save it to the target directory const iconPath = path.join(homePath, '.local/share/icons/VRCX.png'); if (!fs.existsSync(iconPath)) { + const iconDir = path.dirname(iconPath); + if (!fs.existsSync(iconDir)) { + fs.mkdirSync(iconDir, { recursive: true }); + } const iconUrl = 'https://raw.githubusercontent.com/vrcx-team/VRCX/master/VRCX.png'; await downloadIcon(iconUrl, iconPath)