Do not check whether the path exists before deletion (an exception will be caught anyway).
This commit is contained in:
parent
35eea33561
commit
333ea05d9e
1 changed files with 1 additions and 10 deletions
|
@ -56,16 +56,7 @@ namespace Build.Tasks
|
|||
{
|
||||
try
|
||||
{
|
||||
if (String.IsNullOrEmpty(Path) ||
|
||||
System.IO.Directory.Exists(Path))
|
||||
{
|
||||
Log.LogError(String.Format("Path '{0}' does not exist.", Path));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
System.IO.Directory.Delete(Path, true);
|
||||
}
|
||||
System.IO.Directory.Delete(Path, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue