diff --git a/components/wiki/lazwiki/wiki2chmconvert.pas b/components/wiki/lazwiki/wiki2chmconvert.pas index 5dcfb6b1c2..2ce7ff9977 100644 --- a/components/wiki/lazwiki/wiki2chmconvert.pas +++ b/components/wiki/lazwiki/wiki2chmconvert.pas @@ -94,8 +94,11 @@ begin inc(FilesCompressed); debugln(['chm processing ',FilesCompressed,' of ',Writer.FilesToCompress.Count,' "',DataName,'" ...']); Result := False; // Return true to abort compressing files - Filename:=DataName; - PathInChm:='/'; + Filename:=ExtractFileName(DataName); + PathInChm:='/'+ExtractFilePath(DataName); + // cleanup string + PathInChm:=StringReplace(PathInChm, '\','/',[rfReplaceAll]); + PathInChm:=StringReplace(PathInChm, '//','/',[rfReplaceAll]); Page:=TW2CHMPage(DocumentNameToPage[DataName]); if Page<>nil then begin // a page @@ -159,7 +162,6 @@ begin wl('
  • '); wl(' '); wl(' '); - wl(' '); end; finally List.Free;