Sarch path dialog behaviour changed from Delphi 2010 to XE

Yesterday, while working with Delphi 10.1 something happened that made me think I had introduced a bug in the search path dialog enhancement of GExperts:

I had dropped some directories from the explorer onto the memo inserted by the GExperts enhancement, switched to the list view and back to the memo, then pressed the “Make Relative” button and exited the dialog with OK. Nothing special here until I noticed that the search path now contained the last directory twice: Once as a relative path and once as an absolute path.

Today I investigated this a bit more and found that the behaviour of the search path editor dialog had changed from Delphi 2010 to XE: From then on the content of the edit field gets added to the search path even if you don’t press the Add button but just the OK button. Since this only happens if it is not already there, you usually don’t notice, unless you have changed the entries in the list from absolute to relative paths. Then you end up with a duplicate.

I disabled the GExperts enhancements to make sure it’s not cause by it: It’s a change in the dialog itself.

SearchPathOddity