Show path when directory delete fails in test setup

This commit is contained in:
Daniel Plaisted 2017-08-09 23:47:36 -07:00
parent 4ccf1b6902
commit 61e68e621a

View file

@ -50,9 +50,16 @@ namespace Microsoft.DotNet.TestFramework
MigrationBackupRoot = new DirectoryInfo(Path.Combine(root.Parent.FullName, "backup"));
if (Root.Exists)
{
try
{
Root.Delete(recursive: true);
}
catch (IOException ex)
{
throw new InvalidOperationException("Unable to delete directory: " + Root.FullName, ex);
}
}
Root.Create();