mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
refactor: move executable name replate outside the forof
This commit is contained in:
parent
e87f287476
commit
5607f6d524
1 changed files with 3 additions and 3 deletions
|
@ -66,10 +66,10 @@ const findGamePathByProcess = (
|
||||||
const hasProcess = processMap.get(exe);
|
const hasProcess = processMap.get(exe);
|
||||||
|
|
||||||
if (hasProcess) {
|
if (hasProcess) {
|
||||||
|
const executableName = executable.name.replace(/\//g, "\\");
|
||||||
|
|
||||||
for (const path of [...hasProcess]) {
|
for (const path of [...hasProcess]) {
|
||||||
if (
|
if (path.toLowerCase().endsWith(executableName)) {
|
||||||
path.toLowerCase().endsWith(executable.name.replace(/\//g, "\\"))
|
|
||||||
) {
|
|
||||||
gameRepository.update(
|
gameRepository.update(
|
||||||
{ objectID: id, shop: "steam" },
|
{ objectID: id, shop: "steam" },
|
||||||
{ executablePath: path }
|
{ executablePath: path }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue