From f69251a482618b828a748649b447c11d726a2897 Mon Sep 17 00:00:00 2001 From: Massimo Melina Date: Thu, 11 Jun 2020 23:39:38 +0200 Subject: [PATCH] fix: [file.EXT] not working --- classesLib.pas | 2 +- main.pas | 6 +++--- scriptLib.pas | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/classesLib.pas b/classesLib.pas index 13968e9..e033a30 100644 --- a/classesLib.pas +++ b/classesLib.pas @@ -956,7 +956,7 @@ else end; // getTxt function Ttpl.getTxtByExt(fileExt:string):string; -begin result:=getTxt('file.'+fileExt) end; +begin result:=getTxt('file'+fileExt) end; procedure Ttpl.fromString(txt:string); var diff --git a/main.pas b/main.pas index 24c5fab..fc507f3 100644 --- a/main.pas +++ b/main.pas @@ -5609,8 +5609,7 @@ var s:=''; if (s > '') and f.isFolder() and not ansiStartsText('special:', s) then with tplFromFile(f) do // temporarily builds from diff tpls - try - // NB: section [] is not accessible, because of the s>'' test + try section:=getsection(s); if assigned(section) and not section.nourl then // it has to exist and be accessible begin @@ -5619,7 +5618,8 @@ var getPage(s, data, f, me()); exit; end; - finally free end; + finally free + end; if f.isFolder() and not (FA_BROWSABLE in f.flags) and stringExists(urlCmd,['','~folder.tar','~files.lst']) then diff --git a/scriptLib.pas b/scriptLib.pas index cee3ebb..27fc1ad 100644 --- a/scriptLib.pas +++ b/scriptLib.pas @@ -1932,7 +1932,7 @@ try disconnect(); if name = 'stop server' then -- begin + begin stopServer(); exit(''); end;