View Issue Details

IDProjectCategoryView StatusLast Update
0030502LazarusLCLpublic2016-08-22 16:35
ReporterChristian DannerAssigned ToBart Broersma 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWin32OSWindows 7OS VersionProfessional
Product Version1.7 (SVN)Product Build52808 
Target Version1.6.2Fixed in Version1.6.2 
Summary0030502: LazHelpHTML: Quotation marks surrounding executable path prevent browser from being launched
DescriptionThe HTMLBrowserHelpViewer refuses to start with the error message

| Help Viewer Error:
| Browser ""C:\Program Files\Mozilla Firefox\firefox.exe"" not found.

That happens because

  lazarus\lcl\include\sysenvapis_win.inc
  function FindDefaultBrowser(out ABrowser, AParams: String): Boolean;

returns a double quoted path to the executable file in case it contains spaces, whereas in the calling function

  lazarus\lcl\lazhelphtml.pas
  function THTMLBrowserHelpViewer.ShowNode(Node: THelpNode; var ErrMsg: string
    ): TShowHelpResult;

FileExistsUTF8() and FileIsExecutable(), called to validate the returned path,

(line 337 ff.)
| if (not FileExistsUTF8(Executable)) then begin
| ErrMsg:=Format(hhsHelpBrowserNotFound, [Executable]);
| exit;
| end;
| if (not FileIsExecutable(Executable)) then begin
| ErrMsg:=Format(hhsHelpBrowserNotExecutable, [Executable]);
| exit;
| end;

aren't prepared to locate files with the path parameter surrounded by quotation marks, thus return FALSE.
TagsNo tags attached.
Fixed in Revisionr52863
LazTarget1.6.2
WidgetsetWin32/Win64
Attached Files

Activities

Bart Broersma

2016-08-22 14:50

developer   ~0094258

Actually Windows itself quotes it.

Bart Broersma

2016-08-22 15:08

developer   ~0094259

Please test and close if OK.

Christian Danner

2016-08-22 16:34

reporter   ~0094262

Works great, thanks!

Issue History

Date Modified Username Field Change
2016-08-22 14:25 Christian Danner New Issue
2016-08-22 14:50 Bart Broersma Note Added: 0094258
2016-08-22 15:02 Bart Broersma Assigned To => Bart Broersma
2016-08-22 15:02 Bart Broersma Status new => assigned
2016-08-22 15:08 Bart Broersma Fixed in Revision => r52863
2016-08-22 15:08 Bart Broersma LazTarget => 1.6.2
2016-08-22 15:08 Bart Broersma Note Added: 0094259
2016-08-22 15:08 Bart Broersma Status assigned => resolved
2016-08-22 15:08 Bart Broersma Fixed in Version => 1.6.2
2016-08-22 15:08 Bart Broersma Resolution open => fixed
2016-08-22 15:08 Bart Broersma Target Version => 1.6.2
2016-08-22 16:34 Christian Danner Note Added: 0094262
2016-08-22 16:35 Christian Danner Status resolved => closed