Remove use of __dirname from main process

This commit is contained in:
Fedor Indutny
2026-03-27 10:55:37 -07:00
committed by GitHub
parent 70f111e868
commit a048f83dbc
39 changed files with 222 additions and 337 deletions

View File

@@ -5,13 +5,7 @@ import { nativeImage } from 'electron';
import type { NativeImage } from 'electron';
import { join } from 'node:path';
export function getAppErrorIcon(): NativeImage {
const iconPath = join(
__dirname,
'..',
'..',
'images',
'app-icon-with-error.png'
);
export function getAppErrorIcon(rootDir: string): NativeImage {
const iconPath = join(rootDir, 'images', 'app-icon-with-error.png');
return nativeImage.createFromPath(iconPath);
}