summaryrefslogtreecommitdiff
path: root/modules/mono/editor
diff options
context:
space:
mode:
authorIgnacio Etcheverry <neikeq@users.noreply.github.com>2018-10-08 23:33:25 +0200
committerGitHub <noreply@github.com>2018-10-08 23:33:25 +0200
commite6cfaa18cae296e441a0496b28e4ec3e0d4061ee (patch)
tree54fb0dd91a376f0998dd44a361d00e0e65dd482a /modules/mono/editor
parent0063ba92075094b7cc9d36f4551080b89e0c0e50 (diff)
parent3a9b23bcc29d60b332f9e681d1b2dcad818694f2 (diff)
Merge pull request #22865 from neikeq/issue-22854
Check if directory exists before trying to delete it
Diffstat (limited to 'modules/mono/editor')
-rw-r--r--modules/mono/editor/GodotSharpTools/Editor/GodotSharpExport.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/mono/editor/GodotSharpTools/Editor/GodotSharpExport.cs b/modules/mono/editor/GodotSharpTools/Editor/GodotSharpExport.cs
index 9f0d562ef7..5fd708d539 100644
--- a/modules/mono/editor/GodotSharpTools/Editor/GodotSharpExport.cs
+++ b/modules/mono/editor/GodotSharpTools/Editor/GodotSharpExport.cs
@@ -41,9 +41,11 @@ 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))
{
Directory.CreateDirectory(Path.Combine(outputDataDir, dir.Substring(templateDirPath.Length + 1)));