Skip to content

Commit bc47582

Browse files
committed
fixup! Minor changes to DirectoryHelper.DeleteDirectory()
1 parent 1ebf09c commit bc47582

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

LibGit2Sharp.Tests/TestHelpers/DirectoryHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ private static void TryDeleteDirectory(string directoryPath, int maxAttempts, in
8585
}
8686
catch (Exception ex)
8787
{
88-
var exceptionType = ex.GetType();
88+
var caughtExceptionType = ex.GetType();
8989

90-
if (!whitelist.Any(e => exceptionType.IsAssignableFrom(e)))
90+
if (!whitelist.Any(knownExceptionType => knownExceptionType.IsAssignableFrom(caughtExceptionType)))
9191
{
9292
throw;
9393
}
@@ -104,7 +104,7 @@ private static void TryDeleteDirectory(string directoryPath, int maxAttempts, in
104104
"{0}- Windows Search Indexer (go to the Indexing Options, in the Windows Control Panel, and exclude the bin folder of LibGit2Sharp.Tests)" +
105105
"{0}- Antivirus (exclude the bin folder of LibGit2Sharp.Tests from the paths scanned by your real-time antivirus)" +
106106
"{0}- TortoiseGit (change the 'Icon Overlays' settings, e.g., adding the bin folder of LibGit2Sharp.Tests to 'Exclude paths' and appending an '*' to exclude all subfolders as well)",
107-
Environment.NewLine, Path.GetFullPath(directoryPath), maxAttempts, exceptionType, ex.Message));
107+
Environment.NewLine, Path.GetFullPath(directoryPath), maxAttempts, caughtExceptionType, ex.Message));
108108
}
109109
}
110110
}

0 commit comments

Comments
 (0)