Skip to content

Commit

Permalink
Switched GetRealFilesFromList() public static method to use LINQ.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvitaly committed Apr 12, 2024
1 parent 63a0ce9 commit 5450a79
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/corelib/FileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,9 @@ public static List<string> GetRealFilesFromList(List<string> Configs)
List<string> Result = new List<string>();

// Using loop to check a single item from source list...
foreach (string Config in Configs)
foreach (string Config in Configs.Where(e => File.Exists(e)))
{
if (File.Exists(Config))
{
Result.Add(Config);
}
Result.Add(Config);
}

// Returning result...
Expand Down

0 comments on commit 5450a79

Please sign in to comment.