You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minor changes to DirectoryHelper.DeleteDirectory()
- Allow derived exceptions from known ones to be whitelisted
- Trace the number of failed attempts made to delete the directory
- Use named parameters to make the retry parameters less "magic" to the reader
@@ -96,13 +98,13 @@ private static void TryDeleteDirectory(string directoryPath, int maxAttempts, in
96
98
continue;
97
99
}
98
100
99
-
Trace.WriteLine(string.Format("{0}The directory '{1}' could not be deleted due to a {2}: {3}"+
101
+
Trace.WriteLine(string.Format("{0}The directory '{1}' could not be deleted ({2} attempts were made) due to a {3}: {4}"+
100
102
"{0}Most of the time, this is due to an external process accessing the files in the temporary repositories created during the test runs, and keeping a handle on the directory, thus preventing the deletion of those files."+
101
103
"{0}Known and common causes include:"+
102
104
"{0}- Windows Search Indexer (go to the Indexing Options, in the Windows Control Panel, and exclude the bin folder of LibGit2Sharp.Tests)"+
103
105
"{0}- Antivirus (exclude the bin folder of LibGit2Sharp.Tests from the paths scanned by your real-time antivirus)"+
104
106
"{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)",
0 commit comments