Check if directory exists before trying to delete it

This commit is contained in:
Ignacio Etcheverry 2018-10-08 23:03:58 +02:00
parent b17e71b6e5
commit 3a9b23bcc2

View file

@ -41,7 +41,9 @@ namespace GodotSharpTools.Editor
string outputDataDir = Path.Combine(outputDir, GetDataDirName());
if (Directory.Exists(outputDataDir))
Directory.Delete(outputDataDir, recursive: true); // Clean first
Directory.CreateDirectory(outputDataDir);
foreach (string dir in Directory.GetDirectories(templateDirPath, "*", SearchOption.AllDirectories))