fix Report Bug

This commit is contained in:
Abhinav 2022-09-24 15:22:44 +05:30
parent f02e378a0c
commit 0221f51921
2 changed files with 1 additions and 5 deletions

View file

@ -1,8 +1,5 @@
import { ipcRenderer } from 'electron'; import { ipcRenderer } from 'electron';
import { app } from 'electron/main';
export function logError(error: Error, message: string, info?: string): void { export function logError(error: Error, message: string, info?: string): void {
ipcRenderer.invoke('log-error', error, message, info); ipcRenderer.invoke('log-error', error, message, info);
} }
export const getLogFolderPath = () => `${app.getPath('logs')}/${app.name}`;

View file

@ -13,7 +13,6 @@ import { isUpdateAvailable, setIsAppQuitting } from '../main';
import autoLauncher from '../services/autoLauncher'; import autoLauncher from '../services/autoLauncher';
import { isPlatformMac } from './main'; import { isPlatformMac } from './main';
import { showUpdateDialog } from '../services/appUpdater'; import { showUpdateDialog } from '../services/appUpdater';
import { getLogFolderPath } from './logging';
export function buildContextMenu( export function buildContextMenu(
mainWindow: BrowserWindow, mainWindow: BrowserWindow,
@ -244,7 +243,7 @@ export async function buildMenuBar(): Promise<Menu> {
{ {
label: 'Report Bug', label: 'Report Bug',
click: () => { click: () => {
shell.showItemInFolder(getLogFolderPath()); shell.openPath(app.getPath('logs'));
}, },
}, },
], ],