fix: *.diff.tpl

This commit is contained in:
Massimo Melina 2020-05-21 19:47:37 +02:00
parent 2e6bd51e00
commit 6367b5675d
3 changed files with 18 additions and 23 deletions

View File

@ -2815,15 +2815,14 @@ result:=(filesStayFlaggedForMinutes > 0)
and (trunc(abs(now()-t)*24*60) <= filesStayFlaggedForMinutes) and (trunc(abs(now()-t)*24*60) <= filesStayFlaggedForMinutes)
end; // isNew end; // isNew
function getFiles(mask:string):TstringList; function getFiles(mask:string):TStringDynArray;
var var
sr: TSearchRec; sr: TSearchRec;
begin begin
result:=TstringList.create; result:=NIL;
result.CaseSensitive:=FALSE; if findFirst(mask, faAnyFile, sr) = 0 then
if findFirst(exePath+'*.diff.tpl', faAnyFile, sr) = 0 then
try try
repeat result.add(sr.name) repeat addString(sr.name, result)
until findNext(sr) <> 0; until findNext(sr) <> 0;
finally findClose(sr) end; finally findClose(sr) end;
end; // getFiles end; // getFiles
@ -2845,20 +2844,6 @@ var
result:=TRUE; result:=TRUE;
end; // add2diff end; // add2diff
procedure loadStar();
var
list: TstringList;
s: string;
begin
list:=getFiles(exePath+'hfs.diff.*.tpl');
try
list.sort();
for s in list do
add2diff(s);
finally list.free
end;
end;
begin begin
result:=''; result:='';
diff:=''; diff:='';
@ -2904,7 +2889,8 @@ while assigned(f) do
f:=f.parent; f:=f.parent;
first:=FALSE; first:=FALSE;
end; end;
loadStar(); for s in sortArray(getFiles(exePath+'*.diff.tpl')) do
add2diff(loadTextFile(s));
result:=diff; result:=diff;
end; // getRecursiveDiffTplAsStr end; // getRecursiveDiffTplAsStr

View File

@ -1,7 +1,15 @@
+ expiring links
* dismiss regexp lib http://docwiki.embarcadero.com/Libraries/Rio/en/System.RegularExpressions.TRegEx
+ ipv6
+ load *.events
+ url auth limited to resource
+ global limit speed for downloads (browsing excluded)
+ [tpl id] [SECTION|for-tpl=MASK]
* consider letting comment "protected" files. Can it really cause harm? * consider letting comment "protected" files. Can it really cause harm?
* flag to enable lnk files in a folder (disabled by default) * flag to enable lnk files in a folder (disabled by default)
+ sign exe http://www.rejetto.com/forum/hfs-~-http-file-server/'unsafe'/msg1061437/#msg1061437 + sign exe http://www.rejetto.com/forum/hfs-~-http-file-server/'unsafe'/msg1061437/#msg1061437
cache reReplace * cache reReplace
+ {.calc.} to have a third numeric parameter that becomes 'x' symbol
+ hash&salt passwords + hash&salt passwords
- setInterval > setTimeout - setInterval > setTimeout
+ target=_blank as an option on links + target=_blank as an option on links

View File

@ -178,7 +178,7 @@ function idxOf(s:string; a:array of string; isSorted:boolean=FALSE):integer;
function stringExists(s:string; a:array of string; isSorted:boolean=FALSE):boolean; function stringExists(s:string; a:array of string; isSorted:boolean=FALSE):boolean;
function listToArray(l:Tstrings):TstringDynArray; function listToArray(l:Tstrings):TstringDynArray;
function arrayToList(a:TStringDynArray; list:TstringList=NIL):TstringList; function arrayToList(a:TStringDynArray; list:TstringList=NIL):TstringList;
procedure sortArray(var a:TStringDynArray); function sortArray(a:TStringDynArray):TStringDynArray;
// convert // convert
function boolToPtr(b:boolean):pointer; function boolToPtr(b:boolean):pointer;
function strToCharset(s:string):Tcharset; function strToCharset(s:string):Tcharset;
@ -2639,7 +2639,7 @@ accounts[i]:=acc;
result:=@accounts[i]; result:=@accounts[i];
end; // createAccountOnTheFly end; // createAccountOnTheFly
procedure sortArray(var a:TStringDynArray); function sortArray(a:TStringDynArray):TStringDynArray;
var var
i, j, l: integer; i, j, l: integer;
begin begin
@ -2647,6 +2647,7 @@ l:=length(a);
for i:=0 to l-2 do for i:=0 to l-2 do
for j:=i+1 to l-1 do for j:=i+1 to l-1 do
swapMem(a[i], a[j], sizeof(a[i]), ansiCompareText(a[i], a[j]) > 0); swapMem(a[i], a[j], sizeof(a[i]), ansiCompareText(a[i], a[j]) > 0);
result:=a;
end; // sortArray end; // sortArray
procedure onlyForExperts(controls:array of Tcontrol); procedure onlyForExperts(controls:array of Tcontrol);