From 85679f3d5ce4237faea3a9fb3744333b65905ecb Mon Sep 17 00:00:00 2001 From: Humdinger Date: Wed, 31 Jul 2024 17:25:27 +0200 Subject: [PATCH] Fix opening help files + anchors --- src/Help.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Help.cpp b/src/Help.cpp index c29344b..510264b 100644 --- a/src/Help.cpp +++ b/src/Help.cpp @@ -75,10 +75,13 @@ openDocumentation(const char* helpfilename, const char* anchor = NULL) { entry_ref ref = getHelpFile(helpfilename); BPath path(&ref); - path.Append(anchor); + BString url; + url << "file://" << path.Path(); + if (anchor != NULL) + url << anchor; BMessage message(B_REFS_RECEIVED); - message.AddString("url", path.Path()); + message.AddString("url", url.String()); be_roster->Launch("text/html", &message); }