Show path when directory delete fails in test setup
This commit is contained in:
parent
4ccf1b6902
commit
61e68e621a
1 changed files with 8 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue