mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 00:33:59 +00:00
fix: fixing ludusavi download
This commit is contained in:
@@ -106,9 +106,6 @@ export class Ludusavi {
|
||||
|
||||
config.customGames = filteredGames;
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(this.ludusaviPath, "config.yaml"),
|
||||
YAML.stringify(config)
|
||||
);
|
||||
fs.writeFileSync(this.configPath, YAML.stringify(config));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,18 +4,18 @@ import path from "node:path";
|
||||
export class Wine {
|
||||
public static validatePrefix(winePrefixPath: string) {
|
||||
const requiredFiles = [
|
||||
"system.reg",
|
||||
"user.reg",
|
||||
"userdef.reg",
|
||||
"dosdevices",
|
||||
"drive_c",
|
||||
{ name: "system.reg", type: "file" },
|
||||
{ name: "user.reg", type: "file" },
|
||||
{ name: "userdef.reg", type: "file" },
|
||||
{ name: "dosdevices", type: "dir" },
|
||||
{ name: "drive_c", type: "dir" },
|
||||
];
|
||||
|
||||
for (const file of requiredFiles) {
|
||||
const filePath = path.join(winePrefixPath, file);
|
||||
if (!fs.existsSync(filePath)) {
|
||||
return false;
|
||||
}
|
||||
const filePath = path.join(winePrefixPath, file.name);
|
||||
|
||||
if (file.type === "file") return !fs.existsSync(filePath);
|
||||
if (file.type === "dir") return !fs.lstatSync(filePath).isDirectory();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user