refactor: remove redundant plataform validation

This commit is contained in:
JackEnx 2024-12-16 16:37:50 -03:00
parent c2a52d3c18
commit e87f287476

View file

@ -67,12 +67,9 @@ const findGamePathByProcess = (
if (hasProcess) {
for (const path of [...hasProcess]) {
const executableName =
process.platform === "win32"
? executable.name.replace("/", "\\")
: executable.name;
if (path.toLowerCase().endsWith(executableName)) {
if (
path.toLowerCase().endsWith(executable.name.replace(/\//g, "\\"))
) {
gameRepository.update(
{ objectID: id, shop: "steam" },
{ executablePath: path }