Browse Source

* fixes #40893 using Otherfiles parameter to fpdoc with CHM backend.

marcoonthegit 11 months ago
parent
commit
4b4e40dbc9
2 changed files with 4 additions and 4 deletions
  1. 2 2
      utils/fpdoc/dw_basehtml.pp
  2. 2 2
      utils/fpdoc/dw_chm.pp

+ 2 - 2
utils/fpdoc/dw_basehtml.pp

@@ -154,13 +154,13 @@ type
     Property BaseImageURL : String Read FBaseImageURL Write FBaseImageURL;
   end;
 
-Function FixHTMLpath(S : String) : STring;
+Function FixHTMLpath(const S : String) : STring;
 
 implementation
 
 uses fpdocstrs, xmlread, sysutils, sh_pas;
 
-Function FixHTMLpath(S : String) : STring;
+Function FixHTMLpath(const S : String) : STring;
 
 begin
   Result:=StringReplace(S,'\','/',[rfReplaceAll]);

+ 2 - 2
utils/fpdoc/dw_chm.pp

@@ -212,7 +212,7 @@ end;
 function TCHMHTMLWriter.RetrieveOtherFiles(const DataName: String; out
   PathInChm: String; out FileName: String; var Stream: TStream): Boolean;
 begin
-  Result:=True;
+  Result:=False;
   if Stream <> nil then
     Stream.Free;
   Stream := TMemoryStream.Create;
@@ -223,7 +223,7 @@ begin
     PathInChm := ExtractRelativepath(GetCurrentDir, ExtractFileDir(DataName))
   else
     PathInChm := '/';
-  FixHTMLpath(PathInChm);
+  PathInChm:=FixHTMLpath(IncludeLeadingPathDelimiter(IncludeTrailingPathDelimiter(PathInChm)));
   Stream.Position := 0;
 end;