mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 12:12:47 +02:00
IDE: if main unit can not be read: skip
git-svn-id: trunk@22937 -
This commit is contained in:
parent
646abd53bf
commit
1efc58041e
@ -9192,8 +9192,11 @@ begin
|
||||
// read MainUnit Source
|
||||
Result:=LoadCodeBuffer(NewBuf,Project1.MainFilename,
|
||||
[lbfUpdateFromDisk,lbfRevert],false);// do not check if source is text
|
||||
if (Result<>mrOk) then exit;
|
||||
Project1.MainUnitInfo.Source:=NewBuf;
|
||||
case Result of
|
||||
mrOk: Project1.MainUnitInfo.Source:=NewBuf;
|
||||
mrIgnore: Project1.MainUnitInfo.Source:=CodeToolBoss.CreateFile(Project1.MainFilename);
|
||||
else exit(mrCancel);
|
||||
end;
|
||||
end;
|
||||
{$IFDEF IDE_DEBUG}
|
||||
writeln('TMainIDE.DoOpenProjectFile C');
|
||||
|
Loading…
Reference in New Issue
Block a user