Skip to content

Commit

Permalink
Switched AddDirectoriesToList() method to GetDirectories() use.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvitaly committed Aug 31, 2024
1 parent c4a4f9d commit 97be9ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/srcrepair/FrmCleaner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,11 @@ private void AddFilesToList(string CleanDir, string CleanMask)
/// <param name="CleanMask">File mask.</param>
private void AddDirectoriesToList(string CleanDir, string CleanMask)
{
DirectoryInfo DInfo = new DirectoryInfo(CleanDir);
List<string> SubDirs = new List<string>();

foreach (DirectoryInfo Dir in DInfo.GetDirectories())
foreach (string SubDir in Directory.GetDirectories(CleanDir))
{
SubDirs.Add(Path.Combine(Dir.FullName, CleanMask));
SubDirs.Add(Path.Combine(SubDir, CleanMask));
}

if (SubDirs.Count > 0)
Expand Down

0 comments on commit 97be9ec

Please sign in to comment.