Skip to content

Commit

Permalink
+semver: minor | modified logic to identify directory to delete rathe…
Browse files Browse the repository at this point in the history
…r using filename. This fixes #94
  • Loading branch information
Mohammed Owes committed Aug 2, 2023
1 parent 50d68da commit 3fac24d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion directory-deleter/Models/DirectoryModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ await Task.Run(async () =>
foreach (string directory in subdirs)
{
Log.Logger?.Debug($"Searching for {targetFolder} subdirectories in location {currentDirectory}");
if (Path.GetFileName(directory) == targetFolder)
if (Path.GetDirectoryName(directory) == targetFolder)
{
await DeleteDirectoryAsync(directory);
_deleteCount++;
Expand Down

0 comments on commit 3fac24d

Please sign in to comment.