fix: remove symbols from name before creating game shortcut

This commit is contained in:
Zamitto 2024-07-03 15:52:25 -03:00
parent 1397e3932d
commit ae3daa4c79

View File

@ -4,6 +4,7 @@ import { IsNull, Not } from "typeorm";
import createDesktopShortcut from "create-desktop-shortcuts"; import createDesktopShortcut from "create-desktop-shortcuts";
import path from "node:path"; import path from "node:path";
import { app } from "electron"; import { app } from "electron";
import { removeSymbolsFromName } from "@shared";
const createGameShortcut = async ( const createGameShortcut = async (
_event: Electron.IpcMainInvokeEvent, _event: Electron.IpcMainInvokeEvent,
@ -22,7 +23,7 @@ const createGameShortcut = async (
const options = { const options = {
filePath, filePath,
name: game.title, name: removeSymbolsFromName(game.title),
}; };
return createDesktopShortcut({ return createDesktopShortcut({