AssignFile(fileText, selectedDir + PathDelim + 'chipdata.def');
Try
Reset(fileText);
except
on E: Exception do
begin
ShowMessage('Opening ' + selectedDir + PathDelim + 'chipdata.def'
+ LineEnding + 'Failed with error: ' + E.Message + LineEnding);
Form1_Main.Close;
end;
end;
If the file is not found, then the ShowMessage executes twice before the program closes.
The same behaviour is observed on Windows and macOS.
Got me