codetools: define template directory: fixed skipping empty directory

git-svn-id: trunk@54688 -
This commit is contained in:
mattias 2017-04-22 14:44:08 +00:00
parent 9af0510f2d
commit 0bde8fa043

View File

@ -5422,10 +5422,11 @@ var
begin
// template for a sub directory
ReadValue(DirDef,DefTempl.Value,CurPath,TempValue);
// CurPath can be ''
// Note: CurPath can be ''
SubPath:=AppendPathDelim(CurPath)+TempValue;
// test if ExpandedDirectory is part of SubPath
if FilenameIsMatching(SubPath,ExpandedDirectory,false) then begin
if (SubPath<>'') and FilenameIsMatching(SubPath,ExpandedDirectory,false)
then begin
if Assigned(OnCalculate) then
OnCalculate(Self,DefTempl,true,SubPath,false,'',true);
CalculateTemplate(DefTempl.FirstChild,SubPath);