I don't understand how the X could be different from Cancel? Shouldn't cancel be the same as X and vise versed?
A button is a control. When you click a button with a mouse, it has two effects: 1) The button receives focus (and consequently the current control loses the focus). 2) Button action is executed (in this case, the dialog would be canceled).
It's losing of the focus of the INI path edit box that triggers the validation. The validation fails, the edit box never loses the focus and the Cancel button is effectively never clicked.
While the X button is not a control, it cannot receive focus, it merely cancels the dialog. So no validation occurs.
Anyway, this issue has been added to the tracker: