fix subdirectories
This commit is contained in:
parent
eec1e9821d
commit
fa9d83d6d2
2 changed files with 11 additions and 6 deletions
|
@ -172,6 +172,7 @@ internal sealed partial class SelectForm : CustomForm
|
|||
if (dllDirectories is null)
|
||||
{
|
||||
Interlocked.Decrement(ref steamGamesToCheck);
|
||||
DebugForm.Current.Log("no dll " + appId + " - " + name);
|
||||
RemoveFromRemainingGames(name);
|
||||
return;
|
||||
}
|
||||
|
@ -192,6 +193,7 @@ internal sealed partial class SelectForm : CustomForm
|
|||
dlcIds.AddRange(await SteamStore.ParseDlcAppIds(appData));
|
||||
if (appInfo is not null)
|
||||
dlcIds.AddRange(await SteamCMD.ParseDlcAppIds(appInfo));
|
||||
dlcIds = dlcIds.Distinct().ToList();
|
||||
if (dlcIds.Count > 0)
|
||||
foreach (string dlcAppId in dlcIds)
|
||||
{
|
||||
|
@ -528,9 +530,9 @@ internal sealed partial class SelectForm : CustomForm
|
|||
gameChoices.Add((Platform.Steam, appId, name,
|
||||
programsToScan is not null && programsToScan.Any(p => p.platform is Platform.Steam && p.id == appId)));
|
||||
if (EpicLibrary.EpicManifestsPath.DirectoryExists())
|
||||
foreach (Manifest manifest in (await EpicLibrary.GetGames()).Where(m => !Program.IsGameBlocked(m.DisplayName, m.InstallLocation)))
|
||||
gameChoices.Add((Platform.Epic, manifest.CatalogNamespace, manifest.DisplayName,
|
||||
programsToScan is not null && programsToScan.Any(p => p.platform is Platform.Epic && p.id == manifest.CatalogNamespace)));
|
||||
gameChoices.AddRange((await EpicLibrary.GetGames()).Where(m => !Program.IsGameBlocked(m.DisplayName, m.InstallLocation)).Select(manifest
|
||||
=> (Platform.Epic, manifest.CatalogNamespace, manifest.DisplayName,
|
||||
programsToScan is not null && programsToScan.Any(p => p.platform is Platform.Epic && p.id == manifest.CatalogNamespace))));
|
||||
foreach ((string gameId, string name, string _) in (await UbisoftLibrary.GetGames()).Where(g => !Program.IsGameBlocked(g.name, g.gameDirectory)))
|
||||
gameChoices.Add((Platform.Ubisoft, gameId, name,
|
||||
programsToScan is not null && programsToScan.Any(p => p.platform is Platform.Ubisoft && p.id == gameId)));
|
||||
|
@ -678,7 +680,7 @@ internal sealed partial class SelectForm : CustomForm
|
|||
}
|
||||
}
|
||||
|
||||
private List<TreeNode> GatherTreeNodes(TreeNodeCollection nodeCollection)
|
||||
private static List<TreeNode> GatherTreeNodes(TreeNodeCollection nodeCollection)
|
||||
{
|
||||
List<TreeNode> treeNodes = new();
|
||||
foreach (TreeNode rootNode in nodeCollection)
|
||||
|
|
|
@ -89,12 +89,15 @@ internal static class SafeIO
|
|||
return Enumerable.Empty<string>();
|
||||
}
|
||||
|
||||
internal static IEnumerable<string> EnumerateSubdirectories(this string directoryPath, string directoryPattern, bool crucial = false, Form form = null)
|
||||
internal static IEnumerable<string> EnumerateSubdirectories(this string directoryPath, string directoryPattern, bool subdirectories = false,
|
||||
bool crucial = false, Form form = null)
|
||||
{
|
||||
while (!Program.Canceled)
|
||||
try
|
||||
{
|
||||
return Directory.EnumerateDirectories(directoryPath, directoryPattern);
|
||||
return subdirectories
|
||||
? Directory.EnumerateDirectories(directoryPath, directoryPattern, new EnumerationOptions { RecurseSubdirectories = true })
|
||||
: Directory.EnumerateDirectories(directoryPath, directoryPattern);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue