mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
refactor: remove redundant plataform validation
This commit is contained in:
parent
c2a52d3c18
commit
e87f287476
1 changed files with 3 additions and 6 deletions
|
@ -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 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue