IDE: copying packagefiles.xml from secondary config directory

git-svn-id: trunk@15120 -
This commit is contained in:
mattias 2008-05-13 14:37:27 +00:00
parent 67f9451c09
commit b62f0edb8a

View File

@ -138,7 +138,7 @@ type
constructor Create;
destructor Destroy; override;
procedure Clear;
function GetUserLinkFile: string;
function GetUserLinkFile(WithPath: boolean = true): string;
function GetGlobalLinkDirectory: string;
procedure UpdateGlobalLinks;
procedure UpdateUserLinks;
@ -310,9 +310,11 @@ begin
FStates:=[plsUserLinksNeedUpdate,plsGlobalLinksNeedUpdate];
end;
function TPackageLinks.GetUserLinkFile: string;
function TPackageLinks.GetUserLinkFile(WithPath: boolean): string;
begin
Result:=AppendPathDelim(GetPrimaryConfigPath)+'packagefiles.xml';
Result:='packagefiles.xml';
if WithPath then
Result:=AppendPathDelim(GetPrimaryConfigPath)+Result;
end;
function TPackageLinks.GetGlobalLinkDirectory: string;
@ -463,6 +465,9 @@ begin
and (FileAge(ConfigFilename)=UserLinkLoadTime) then
exit;
// copy system default if needed
CopySecondaryConfigFile(GetUserLinkFile(false));
FUserLinksSortID.FreeAndClear;
FUserLinksSortFile.Clear;
XMLConfig:=nil;