From 244b3f1881f45bce5e7d59a87d17d75a64df25cf Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Tue, 5 Oct 2010 20:51:47 +0000 Subject: [PATCH] Do not check whether the path exists before deletion (an exception will be caught anyway). --- Source/Build.Tasks/DelTree.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Source/Build.Tasks/DelTree.cs b/Source/Build.Tasks/DelTree.cs index c5605728..e74cedaf 100644 --- a/Source/Build.Tasks/DelTree.cs +++ b/Source/Build.Tasks/DelTree.cs @@ -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) {