Check if directory exists before trying to delete it
This commit is contained in:
parent
b17e71b6e5
commit
3a9b23bcc2
1 changed files with 4 additions and 2 deletions
|
@ -41,7 +41,9 @@ namespace GodotSharpTools.Editor
|
|||
|
||||
string outputDataDir = Path.Combine(outputDir, GetDataDirName());
|
||||
|
||||
Directory.Delete(outputDataDir, recursive: true); // Clean first
|
||||
if (Directory.Exists(outputDataDir))
|
||||
Directory.Delete(outputDataDir, recursive: true); // Clean first
|
||||
|
||||
Directory.CreateDirectory(outputDataDir);
|
||||
|
||||
foreach (string dir in Directory.GetDirectories(templateDirPath, "*", SearchOption.AllDirectories))
|
||||
|
|
Loading…
Reference in a new issue