Handle Thief 2 inst config file

This commit is contained in:
Jarrod Doyle 2024-08-13 19:10:05 +01:00
parent e773635677
commit 9db1bc6681
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 6 additions and 1 deletions

View File

@ -21,7 +21,12 @@ public class InstallPaths
rootPath = root;
famPath = Directory.GetFiles(rootPath, "fam.crf", searchOptions)[0];
var installCfgPath = Directory.GetFiles(rootPath, "install.cfg", searchOptions)[0];
var paths = Directory.GetFiles(rootPath, "install.cfg", searchOptions);
if (paths.Length == 0)
{
paths = Directory.GetFiles(rootPath, "darkinst.cfg", searchOptions);
}
var installCfgPath = paths[0];
GD.Print($"Install.cfg: {installCfgPath}");
foreach (var line in File.ReadLines(installCfgPath))
{