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 begin
// template for a sub directory // template for a sub directory
ReadValue(DirDef,DefTempl.Value,CurPath,TempValue); ReadValue(DirDef,DefTempl.Value,CurPath,TempValue);
// CurPath can be '' // Note: CurPath can be ''
SubPath:=AppendPathDelim(CurPath)+TempValue; SubPath:=AppendPathDelim(CurPath)+TempValue;
// test if ExpandedDirectory is part of SubPath // 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 if Assigned(OnCalculate) then
OnCalculate(Self,DefTempl,true,SubPath,false,'',true); OnCalculate(Self,DefTempl,true,SubPath,false,'',true);
CalculateTemplate(DefTempl.FirstChild,SubPath); CalculateTemplate(DefTempl.FirstChild,SubPath);