Do not trim refs

This commit is contained in:
Pavel Krymets 2016-04-01 21:52:08 -07:00
parent f665c28173
commit 8831bb4a8b
31 changed files with 455 additions and 108 deletions

View file

@ -96,8 +96,24 @@ namespace Microsoft.DotNet.Cli.Build
File.SetAttributes(file, FileAttributes.Normal);
File.Delete(file);
}
System.Threading.Thread.Sleep(1);
Directory.Delete(path, true);
var retry = 5;
while (retry >= 0)
{
try
{
Directory.Delete(path, true);
return;
}
catch (IOException ex)
{
if (retry == 0)
{
throw;
}
System.Threading.Thread.Sleep(200);
retry--;
}
}
}
}