Skip to content

Commit

Permalink
loading hfs.diff.*.tpl in exe's folder
Browse files Browse the repository at this point in the history
  • Loading branch information
rejetto committed May 10, 2020
1 parent 3bea9cd commit 9d65d35
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
8 changes: 2 additions & 6 deletions hfs.dproj.local
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@
<File Path="shellExtDlg.dfm"/>
<File Path="utillib.pas"/>
<File Path="traylib.pas"/>
<File Path="inputDialogs.pas"/>
<File Path="inputDialogs.dfm"/>
</ProjectSortOrder> <Transactions>
<Transaction>2020/05/06 23:30:42.800,=C:\code\mine\hfs\Unit1.pas</Transaction>
<Transaction>2020/05/06 23:38:14.406,C:\code\mine\hfs\inputDialogs.dfm=C:\code\mine\hfs\Unit1.dfm</Transaction>
<Transaction>2020/05/06 23:38:14.406,C:\code\mine\hfs\inputDialogs.pas=C:\code\mine\hfs\Unit1.pas</Transaction>
</ProjectSortOrder>
<Transactions>
</Transactions>
</BorlandProject>
28 changes: 28 additions & 0 deletions main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2799,6 +2799,19 @@ function Tfile.isNew():boolean;
and (trunc(abs(now()-t)*24*60) <= filesStayFlaggedForMinutes)
end; // isNew

function getFiles(mask:string):TstringList;
var
sr: TSearchRec;
begin
result:=TstringList.create;
result.CaseSensitive:=FALSE;
if findFirst(exePath+'hfs.diff.*.tpl', faAnyFile, sr) = 0 then
try
repeat result.add(sr.name)
until findNext(sr) <> 0;
finally findClose(sr) end;
end; // getFiles

function Tfile.getRecursiveDiffTplAsStr(outInherited:Pboolean=NIL; outFromDisk:Pboolean=NIL):string;
var
basePath, runPath, s, fn, diff: string;
Expand All @@ -2816,6 +2829,20 @@ function Tfile.getRecursiveDiffTplAsStr(outInherited:Pboolean=NIL; outFromDisk:P
result:=TRUE;
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
result:='';
diff:='';
Expand Down Expand Up @@ -2861,6 +2888,7 @@ function Tfile.getRecursiveDiffTplAsStr(outInherited:Pboolean=NIL; outFromDisk:P
f:=f.parent;
first:=FALSE;
end;
loadStar();
result:=diff;
end; // getRecursiveDiffTplAsStr

Expand Down
5 changes: 3 additions & 2 deletions whatsnew.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ propaganda
+ {.set cfg.}
+ cache for jquery and template sections
+ new template commands: base64, base64decode, md5, sha1
+ hfs.diff.*.tpl in exe's folder
- fixed template handling of section names with both '+' and '=' present
- fixed LNK files to deleted items
- fixed comments files were not updated upon deletion of files
Expand Down Expand Up @@ -850,7 +851,7 @@ ver: 1.5 rc5
+ support for persistent connections (HTTP 1.1)
* moved many options to Menu -> "Other options"
* when drag&dropping a folder, the dialog for autoupdate is set foreground
- problems with url-encoding for � � � � � (IE, Opera)
- problems with url-encoding for � � � � � (IE, Opera)
- problems saving a template to registry
- sometimes "check for update" was not working after a failure
- CRITICAL: directory crossing was possible on autoupdating folders
Expand Down Expand Up @@ -903,7 +904,7 @@ ver: 1.3 beta6
ver: 1.3 beta5
+ "Custom ip", now you can use yourowndomain.com
- autoupdate folders was not applying the "Folders before" setting
- there were problems with url-encoding for blank-space, � and "
- there were problems with url-encoding for blank-space, � and "
- some crashes may have been fixed

ver: 1.3 beta4
Expand Down

0 comments on commit 9d65d35

Please sign in to comment.