Issue not exists on gtk2 on Linux. Make the simple program with Button.OnClick
procedure TForm1.Button1Click(Sender: TObject);
begin
SaveDialog1.InitialDir:= ExtractFileDir(Application.ExeName);
SaveDialog1.Options:= [ofOverwritePrompt,ofPathMustExist,ofEnableSizing,ofDontAddToRecent,ofViewDetail];
SaveDialog1.Filter:= 'YAML|*.yml;*.yaml|All files|*';
//bug exists only if '*' is after 'All files|'
SaveDialog1.DefaultExt:= 'yml';
SaveDialog1.FileName:= '';
if SaveDialog1.Execute then
caption:= 'chosen: '+ExtractFileName(SaveDialog1.FileName)
else
caption:= 'cancel';
end;
- run the demo, press the btn
- choose 2nd filter - ie 'All files'
- enter filename 'n.lua', OK
--> resulting filename is 'n.lua.yml' with bad tail.
If i replace '*' mask with '*.*', no bug.