mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-27 04:41:03 +00:00
feat: using showItemInFolder to open exe and download paths
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { shell } from "electron";
|
||||
import path from "node:path";
|
||||
import { gameRepository } from "@main/repository";
|
||||
import { registerEvent } from "../register-event";
|
||||
|
||||
@@ -11,12 +10,9 @@ const openGameExecutablePath = async (
|
||||
where: { id: gameId, isDeleted: false },
|
||||
});
|
||||
|
||||
if (!game || !game.executablePath) return true;
|
||||
if (!game || !game.executablePath) return;
|
||||
|
||||
const gamePath = path.join(game.executablePath, "../");
|
||||
|
||||
shell.openPath(gamePath);
|
||||
return true;
|
||||
shell.showItemInFolder(game.executablePath);
|
||||
};
|
||||
|
||||
registerEvent("openGameExecutablePath", openGameExecutablePath);
|
||||
|
||||
Reference in New Issue
Block a user