Skip to content

Commit

Permalink
fix: [file.EXT] not working
Browse files Browse the repository at this point in the history
  • Loading branch information
rejetto committed Jun 11, 2020
1 parent 1f713f7 commit f69251a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion classesLib.pas
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ function Ttpl.getTxt(section:string):string;
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
Expand Down
6 changes: 3 additions & 3 deletions main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5609,8 +5609,7 @@ procedure Tmainfrm.httpEvent(event:ThttpEvent; conn:ThttpConn);
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
Expand All @@ -5619,7 +5618,8 @@ procedure Tmainfrm.httpEvent(event:ThttpEvent; conn:ThttpConn);
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
Expand Down
2 changes: 1 addition & 1 deletion scriptLib.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ function cbMacros(fullMacro:string; pars:Tstrings; cbData:pointer):string;
disconnect();

if name = 'stop server' then
- begin
begin
stopServer();
exit('');
end;
Expand Down

0 comments on commit f69251a

Please sign in to comment.