ProjectTemplates: Prevent wrongly replacing "project" in .lpi file. Issue #39467.

This commit is contained in:
Juha 2021-11-17 03:14:42 +02:00
parent dda3cc7c81
commit dda96a3864
2 changed files with 4 additions and 3 deletions

View File

@ -9,7 +9,7 @@ uses
// LCL
LResources, Forms, Controls, Graphics, Dialogs,
// LazUtils
LazFileUtils,
LazFileUtils, LazLoggerBase,
// IdeIntf
ProjectIntf, NewItemIntf, MenuIntf, BaseIDEIntf, LazIDEIntf,
// ProjectTemplates
@ -113,7 +113,8 @@ var
sl: TStringList;
i: Integer;
begin
if not FileExistsUTF8(FN) then
//DebugLn(['FileReplaceText: From=', AFrom, ', To=', ATo]);
if (not FileExistsUTF8(FN)) or (AFrom='') then
exit;
sl:=TStringList.Create;
try

View File

@ -254,7 +254,7 @@ begin
inherited Create(ACollection);
FVariables:=TStringList.Create;
FFiles:=TStringList.Create;
FProjectFile:='project' // Do not localize
FProjectFile:='';
end;