Permalink
Browse files

Use DeleteDirectorySafe helper

  • Loading branch information...
1 parent befd0a5 commit 4c36ccaddddcfe8a431a311b90b26df81353f55c @davidebbo davidebbo committed Dec 3, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 Kudu.TestHarness/Git.cs
@@ -135,11 +135,7 @@ private static string CreateCachedRepo(string repositoryName, string source, IDi
else
{
// Delete any leftover, ignoring errors
- try
- {
- Directory.Delete(cachedPath, recursive: true);
- }
- catch { }
+ FileSystemHelpers.DeleteDirectorySafe(cachedPath);
Trace.WriteLine(String.Format("Could not find a cached copy at {0}. Cloning from source {1}.", cachedPath, source));
PathHelper.EnsureDirectory(cachedPath);

0 comments on commit 4c36cca

Please sign in to comment.