// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.Collections.Generic;
public override bool Execute ()
{
+ if (directories.Length == 0)
+ return true;
+
bool result = true;
List <ITaskItem> temporaryDirectoriesCreated = new List <ITaskItem> ();
foreach (ITaskItem directory in directories) {
+ string path = directory.GetMetadata ("FullPath");
+ if (Directory.Exists (path))
+ continue;
+
try {
- Directory.CreateDirectory (directory.GetMetadata ("FullPath"));
+ Directory.CreateDirectory (path);
temporaryDirectoriesCreated.Add (directory);
+ Log.LogMessage (MessageImportance.Normal, "Created directory \"{0}\"", directory.ItemSpec);
}
catch (Exception ex) {
Log.LogErrorFromException (ex);
}
}
-#endif