mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 05:46:17 +00:00
fix: steam user path not found
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydralauncher",
|
"name": "hydralauncher",
|
||||||
"version": "3.6.7",
|
"version": "3.6.8",
|
||||||
"description": "Hydra",
|
"description": "Hydra",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "Los Broxas",
|
"author": "Los Broxas",
|
||||||
|
|||||||
@@ -82,17 +82,19 @@ export const getSteamAppDetails = async (
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getSteamUsersIds = async () => {
|
export const getSteamUsersIds = async () => {
|
||||||
const userDataPath = await getSteamLocation().catch(() => null);
|
const steamLocation = await getSteamLocation().catch(() => null);
|
||||||
|
|
||||||
if (!userDataPath) {
|
if (!steamLocation) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const userDataPath = path.join(steamLocation, "userdata");
|
||||||
|
|
||||||
if (!fs.existsSync(userDataPath)) {
|
if (!fs.existsSync(userDataPath)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const userIds = fs.readdirSync(path.join(userDataPath, "userdata"), {
|
const userIds = fs.readdirSync(userDataPath, {
|
||||||
withFileTypes: true,
|
withFileTypes: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user