Show path when directory delete fails in test setup
(cherry picked from commit 61e68e621a
)
This commit is contained in:
parent
db1dabca9a
commit
dd4a1b5121
1 changed files with 8 additions and 1 deletions
|
@ -51,7 +51,14 @@ namespace Microsoft.DotNet.TestFramework
|
|||
|
||||
if (Root.Exists)
|
||||
{
|
||||
Root.Delete(recursive: true);
|
||||
try
|
||||
{
|
||||
Root.Delete(recursive: true);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
throw new InvalidOperationException("Unable to delete directory: " + Root.FullName, ex);
|
||||
}
|
||||
}
|
||||
|
||||
Root.Create();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue