summaryrefslogtreecommitdiff
path: root/modules/mono/editor
diff options
context:
space:
mode:
authordsge <gerx03@gmail.com>2019-11-30 15:39:44 +0100
committerdsge <gerx03@gmail.com>2019-11-30 15:44:18 +0100
commit81cae314b435e6cff83dd5438877c29a15ba6bdb (patch)
tree2bbca202b74f20932159639d95c730bb8d660ace /modules/mono/editor
parentcde6775e1197e67242c143b7885703a196e31cb2 (diff)
Make sure to include the path in the "Data template directory not found" error message
Diffstat (limited to 'modules/mono/editor')
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs
index aed25f5ac5..52a07037df 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs
@@ -201,23 +201,25 @@ namespace GodotTools.Export
string TemplateDirName() => $"data.mono.{platform}.{bits}.{target}";
string templateDirPath = Path.Combine(Internal.FullTemplatesDir, TemplateDirName());
+ bool validTemplatePathFound = true;
if (!Directory.Exists(templateDirPath))
{
- templateDirPath = null;
+ validTemplatePathFound = false;
if (isDebug)
{
target = "debug"; // Support both 'release_debug' and 'debug' for the template data directory name
templateDirPath = Path.Combine(Internal.FullTemplatesDir, TemplateDirName());
+ validTemplatePathFound = true;
if (!Directory.Exists(templateDirPath))
- templateDirPath = null;
+ validTemplatePathFound = false;
}
}
- if (templateDirPath == null)
- throw new FileNotFoundException("Data template directory not found");
+ if (!validTemplatePathFound)
+ throw new FileNotFoundException("Data template directory not found", templateDirPath);
string outputDataDir = Path.Combine(outputDir, DataDirName);