sysenvapis_win: don't use 'open' verb for shellexecute in OpenDocument. Use nil instead. This will perform the default action. Resolves issue #22374.

git-svn-id: trunk@38958 -
This commit is contained in:
bart 2012-10-03 11:27:48 +00:00
parent fd7d0baca4
commit 6a491651ad

View File

@ -24,12 +24,12 @@ begin
if Win32Platform = VER_PLATFORM_WIN32_NT then
begin
ws := UTF8Decode(AURL);
Result := ShellExecuteW(0, 'open', PWideChar(ws), nil, nil, SW_SHOWNORMAL) > 32;
Result := ShellExecuteW(0, nil, PWideChar(ws), nil, nil, SW_SHOWNORMAL) > 32;
end
else
begin
ans := Utf8ToAnsi(AURL); // utf8 must be converted to Windows Ansi-codepage
Result := ShellExecute(0, 'open', PAnsiChar(ans), nil, nil, SW_SHOWNORMAL) > 32;
Result := ShellExecute(0, nil, PAnsiChar(ans), nil, nil, SW_SHOWNORMAL) > 32;
end;
{$ENDIF}
end;