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)