fix: steam user path not found
Some checks failed
Release / build (ubuntu-latest) (push) Has been cancelled
Release / build (windows-latest) (push) Has been cancelled

This commit is contained in:
Zamitto
2025-09-06 12:34:07 -03:00
parent 1dc2176813
commit 01ac5239dc
2 changed files with 6 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "hydralauncher",
"version": "3.6.7",
"version": "3.6.8",
"description": "Hydra",
"main": "./out/main/index.js",
"author": "Los Broxas",

View File

@@ -82,17 +82,19 @@ export const getSteamAppDetails = async (
};
export const getSteamUsersIds = async () => {
const userDataPath = await getSteamLocation().catch(() => null);
const steamLocation = await getSteamLocation().catch(() => null);
if (!userDataPath) {
if (!steamLocation) {
return [];
}
const userDataPath = path.join(steamLocation, "userdata");
if (!fs.existsSync(userDataPath)) {
return [];
}
const userIds = fs.readdirSync(path.join(userDataPath, "userdata"), {
const userIds = fs.readdirSync(userDataPath, {
withFileTypes: true,
});