diff --git a/lcl/interfaces/win32/win32wsdialogs.pp b/lcl/interfaces/win32/win32wsdialogs.pp index 29dcbee8bd..cd5dade54d 100644 --- a/lcl/interfaces/win32/win32wsdialogs.pp +++ b/lcl/interfaces/win32/win32wsdialogs.pp @@ -843,7 +843,7 @@ begin Result := 0; if ofAllowMultiSelect in Options then Result := Result or FOS_ALLOWMULTISELECT; if ofCreatePrompt in Options then Result := Result or FOS_CREATEPROMPT; - if ofExtensionDifferent in Options then Result := Result or FOS_STRICTFILETYPES; + if not (ofExtensionDifferent in Options) then Result := Result or FOS_STRICTFILETYPES; if ofFileMustExist in Options then Result := Result or FOS_FILEMUSTEXIST; if ofNoChangeDir in Options then Result := Result or FOS_NOCHANGEDIR; if ofNoDereferenceLinks in Options then Result := Result or FOS_NODEREFERENCELINKS;