fix: Correct __dirname paths for Vite bundled electron modules

Vite bundles all electron modules into a single main.js file,
so __dirname remains apps/ui/dist-electron regardless of source
file location. Updated path comments to clarify this behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Shirone
2026-01-25 20:49:53 +01:00
parent 615823652c
commit d7ad87bd1b
4 changed files with 17 additions and 13 deletions

View File

@@ -27,9 +27,10 @@ export function getIconPath(): string | null {
iconFile = 'logo_larger.png';
}
// __dirname is apps/ui/dist-electron (Vite bundles all into single file)
const iconPath = isDev
? path.join(__dirname, '../../public', iconFile)
: path.join(__dirname, '../../dist/public', iconFile);
? path.join(__dirname, '../public', iconFile)
: path.join(__dirname, '../dist/public', iconFile);
try {
if (!electronAppExists(iconPath)) {