Skip to content

Commit

Permalink
Switched GetUserIDs() private method to use LINQ.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvitaly committed Apr 11, 2024
1 parent 45d7d42 commit 63a0ce9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/corelib/SteamManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using NLog;

Expand Down Expand Up @@ -167,12 +168,10 @@ private void GetUserIDs()
if (Directory.Exists(FullUserDataPath))
{
DirectoryInfo DInfo = new DirectoryInfo(FullUserDataPath);
foreach (DirectoryInfo SubDir in DInfo.GetDirectories())
DirectoryInfo[] SubDirs = DInfo.GetDirectories();
foreach (DirectoryInfo SubDir in SubDirs.Where(e => SteamConv.ValidateUserID(e.Name)))
{
if (SteamConv.ValidateUserID(SubDir.Name))
{
SteamIDs.Add(SubDir.Name);
}
SteamIDs.Add(SubDir.Name);
}
}
}
Expand Down

0 comments on commit 63a0ce9

Please sign in to comment.