mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 12:49:28 +02:00
fixed error handling reading pkg links
git-svn-id: trunk@8235 -
This commit is contained in:
parent
a4f6996c21
commit
b509adcfde
@ -6180,7 +6180,6 @@ function TMainIDE.DoOpenFileAndJumpToPos(const AFilename: string;
|
||||
var
|
||||
ActiveUnitInfo, OldActiveUnitInfo: TUnitInfo;
|
||||
ActiveSrcEdit, OldActiveSrcEdit: TSourceEditor;
|
||||
NewSource: TCodeBuffer;
|
||||
begin
|
||||
GetCurrentUnit(OldActiveSrcEdit,OldActiveUnitInfo);
|
||||
Result:=DoOpenEditorFile(AFilename, PageIndex, Flags);
|
||||
|
@ -400,10 +400,11 @@ begin
|
||||
DebugLn('WARNING: suspicious pkg link file found (name): ',CurFilename);
|
||||
continue;
|
||||
end;
|
||||
NewFilename:='';
|
||||
sl:=TStringList.Create;
|
||||
try
|
||||
sl.LoadFromFile(CurFilename);
|
||||
if sl.Count<0 then begin
|
||||
if sl.Count<=0 then begin
|
||||
DebugLn('WARNING: suspicious pkg link file found (content): ',CurFilename);
|
||||
continue;
|
||||
end;
|
||||
@ -414,6 +415,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
sl.Free;
|
||||
if NewFilename='' then continue;
|
||||
|
||||
NewPkgLink:=TPackageLink.Create;
|
||||
NewPkgLink.Origin:=ploGlobal;
|
||||
|
Loading…
Reference in New Issue
Block a user