remove unused subfolder manifest scanning

This isn't needed anymore with the current is-mod-folder scanning.
This commit is contained in:
Jesse Plamondon-Willard 2022-04-16 14:34:52 -04:00
parent f93c41f55c
commit 559d763756
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
1 changed files with 16 additions and 27 deletions

View File

@ -249,8 +249,6 @@ namespace StardewModdingAPI.Toolkit.Framework.ModScanning
/// <summary>Find the manifest for a mod folder.</summary>
/// <param name="folder">The folder to search.</param>
private FileInfo? FindManifest(DirectoryInfo folder)
{
while (true)
{
// check for conventional manifest in current folder
const string defaultName = "manifest.json";
@ -268,18 +266,9 @@ namespace StardewModdingAPI.Toolkit.Framework.ModScanning
if (file.Exists)
return file;
// check for single subfolder
FileSystemInfo[] entries = folder.EnumerateFileSystemInfos().Take(2).ToArray();
if (entries.Length == 1 && entries[0] is DirectoryInfo subfolder)
{
folder = subfolder;
continue;
}
// not found
return null;
}
}
/// <summary>Get whether a given folder should be treated as a search folder (i.e. look for subfolders containing mods).</summary>
/// <param name="root">The root mod folder.</param>