Fix paradox launcher root directory
This commit is contained in:
parent
bb7af1b8b1
commit
d19a270d7c
1 changed files with 5 additions and 8 deletions
|
@ -122,26 +122,23 @@ namespace CreamInstaller
|
|||
{
|
||||
progress.Report(++curProgress);
|
||||
if (Program.ProgramSelections.Any(selection => selection.ProgramName == node.Name)) { continue; }
|
||||
string rootDirectory;
|
||||
string rootDirectory = null;
|
||||
List<string> directories = null;
|
||||
if (node.Name == "Paradox Launcher")
|
||||
{
|
||||
rootDirectory = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
string launcherDirectory = rootDirectory + "\\Programs\\Paradox Interactive";
|
||||
if (Directory.Exists(launcherDirectory))
|
||||
rootDirectory = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Programs\\Paradox Interactive";
|
||||
if (Directory.Exists(rootDirectory))
|
||||
{
|
||||
directories = GetSteamApiDllDirectoriesFromGameDirectory(launcherDirectory);
|
||||
directories = GetSteamApiDllDirectoriesFromGameDirectory(rootDirectory);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rootDirectory = null;
|
||||
directories = null;
|
||||
foreach (string libraryDirectory in GameLibraryDirectories)
|
||||
{
|
||||
if (Program.Canceled) { return; }
|
||||
rootDirectory = GetGameDirectoryFromLibraryDirectory(node.Name, libraryDirectory);
|
||||
if (rootDirectory != null)
|
||||
if (Directory.Exists(rootDirectory))
|
||||
{
|
||||
directories = GetSteamApiDllDirectoriesFromGameDirectory(rootDirectory);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue