Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions TiaGitHandler/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,7 @@ public static void DeleteDirectory(string path)
DeleteDir(path);
}

static int DeleteDirCounter = 0;
private static void DeleteDir(string dir)
{
try
Expand All @@ -1243,10 +1244,16 @@ private static void DeleteDir(string dir)
}
catch (IOException)
{
DeleteDirCounter++;
if (DeleteDirCounter > 10)
throw;
DeleteDir(dir);
}
catch (UnauthorizedAccessException)
{
DeleteDirCounter++;
if (DeleteDirCounter > 10)
throw;
DeleteDir(dir);
}
}
Expand Down
Loading