mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-10 17:38:25 +02:00
IDE: Code-Templates, do not create lazarus.dci unless it is modified.
git-svn-id: trunk@62272 -
This commit is contained in:
parent
c018dfafb9
commit
426a0e8392
@ -4612,8 +4612,6 @@ end;
|
||||
constructor TEditorOptions.Create;
|
||||
var
|
||||
ConfFileName: String;
|
||||
fs: TFileStreamUTF8;
|
||||
res: TResourceStream;
|
||||
begin
|
||||
inherited Create;
|
||||
InitLocale;
|
||||
@ -4643,23 +4641,6 @@ begin
|
||||
fCodeTemplateFileNameRaw :=
|
||||
TrimFilename(AppendPathDelim(GetPrimaryConfigPath)+DefaultCodeTemplatesFilename);
|
||||
CopySecondaryConfigFile(DefaultCodeTemplatesFilename);
|
||||
if not FileExistsUTF8(CodeTemplateFileNameExpand) then
|
||||
begin
|
||||
res := TResourceStream.Create(HInstance, PChar('lazarus_dci_file'), PChar(RT_RCDATA));
|
||||
try
|
||||
InvalidateFileStateCache;
|
||||
fs := TFileStreamUTF8.Create(CodeTemplateFileNameExpand, fmCreate);
|
||||
try
|
||||
fs.CopyFrom(res, res.Size);
|
||||
finally
|
||||
fs.Free;
|
||||
end;
|
||||
except
|
||||
DebugLn('WARNING: unable to write code template file "',
|
||||
CodeTemplateFileNameExpand, '"');
|
||||
end;
|
||||
res.Free;
|
||||
end;
|
||||
|
||||
FMultiWinEditAccessOrder := TEditorOptionsEditAccessOrderList.Create;
|
||||
FMultiWinEditAccessOrder.InitDefaults;
|
||||
|
Loading…
Reference in New Issue
Block a user