Make sure to include the path in the "Data template directory not found" error message
This commit is contained in:
parent
cde6775e11
commit
81cae314b4
@ -201,23 +201,25 @@ namespace GodotTools.Export
|
|||||||
string TemplateDirName() => $"data.mono.{platform}.{bits}.{target}";
|
string TemplateDirName() => $"data.mono.{platform}.{bits}.{target}";
|
||||||
|
|
||||||
string templateDirPath = Path.Combine(Internal.FullTemplatesDir, TemplateDirName());
|
string templateDirPath = Path.Combine(Internal.FullTemplatesDir, TemplateDirName());
|
||||||
|
bool validTemplatePathFound = true;
|
||||||
|
|
||||||
if (!Directory.Exists(templateDirPath))
|
if (!Directory.Exists(templateDirPath))
|
||||||
{
|
{
|
||||||
templateDirPath = null;
|
validTemplatePathFound = false;
|
||||||
|
|
||||||
if (isDebug)
|
if (isDebug)
|
||||||
{
|
{
|
||||||
target = "debug"; // Support both 'release_debug' and 'debug' for the template data directory name
|
target = "debug"; // Support both 'release_debug' and 'debug' for the template data directory name
|
||||||
templateDirPath = Path.Combine(Internal.FullTemplatesDir, TemplateDirName());
|
templateDirPath = Path.Combine(Internal.FullTemplatesDir, TemplateDirName());
|
||||||
|
validTemplatePathFound = true;
|
||||||
|
|
||||||
if (!Directory.Exists(templateDirPath))
|
if (!Directory.Exists(templateDirPath))
|
||||||
templateDirPath = null;
|
validTemplatePathFound = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (templateDirPath == null)
|
if (!validTemplatePathFound)
|
||||||
throw new FileNotFoundException("Data template directory not found");
|
throw new FileNotFoundException("Data template directory not found", templateDirPath);
|
||||||
|
|
||||||
string outputDataDir = Path.Combine(outputDir, DataDirName);
|
string outputDataDir = Path.Combine(outputDir, DataDirName);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user