update file searching in folder load

master
Jan Beníček 2023-01-28 19:37:04 +01:00
parent e8a83fb76e
commit 34b98123ae
1 changed files with 2 additions and 5 deletions

View File

@ -77,12 +77,9 @@ namespace Lib_MCPlayerStats
{ {
List<Player_Stats> stats = new(); List<Player_Stats> stats = new();
foreach (string file in Directory.GetFiles(folder)) //Search all .json files for load in selected directory foreach (string file in Directory.GetFiles(folder, "*.json", SearchOption.TopDirectoryOnly)) //Search all .json files for load in selected directory
{ {
if (file.EndsWith(".json")) stats.Add(await LoadPlayerAsync(file, rmc));
{
stats.Add(await LoadPlayerAsync(file, rmc));
}
} }
return stats; return stats;