Support ancient .NET in DatTools

This commit is contained in:
Matt Nadareski
2024-02-29 00:14:16 -05:00
parent af86287af4
commit fc061ae555
11 changed files with 148 additions and 60 deletions

View File

@@ -547,7 +547,11 @@ CREATE TABLE IF NOT EXISTS dat (
internal Dictionary<string, string> GetValidDats(List<string> inputs)
{
// Get a dictionary of filenames that actually exist in the DATRoot, logging which ones are not
#if NET20 || NET35
List<string> datRootDats = Directory.GetFiles(_dats, "*").ToList();
#else
List<string> datRootDats = Directory.EnumerateFiles(_dats, "*", SearchOption.AllDirectories).ToList();
#endif
List<string> lowerCaseDats = datRootDats.ConvertAll(i => Path.GetFileName(i).ToLowerInvariant());
Dictionary<string, string> foundDats = new Dictionary<string, string>();
foreach (string input in inputs)