LazHelpHtml: UnQuotes the result of FinddefaultBrowser. Resolves issue #0030502.

git-svn-id: trunk@52863 -
This commit is contained in:
bart 2016-08-22 13:07:30 +00:00
parent 602280cef5
commit 8c06636b4b

View File

@ -334,6 +334,13 @@ begin
ErrMsg:=hhsHelpNoHTMLBrowserFound;
exit;
end;
{$ifdef windows}
//The result of FindDefaultBrowser may or may not be quoted on Windows
//Since on Windows, a filename cannot contain a double quote, we simply remove them
//otherwise FileExistsUf8 and FileIsExecutable fail. Issue #0030502
if (Length(Executable) > 1) and (Executable[1] = '"') and (Executable[Length(Executable)] = '"') then
Executable := Copy(Executable, 2, Length(Executable)-2);
{$endif windows}
if (not FileExistsUTF8(Executable)) then begin
ErrMsg:=Format(hhsHelpBrowserNotFound, [Executable]);
exit;