From f232d9d22c2f003e14cb95bbd6d6785551c00ebf Mon Sep 17 00:00:00 2001 From: EXL Date: Sun, 9 Dec 2018 09:23:20 +0700 Subject: [PATCH] AboutSystem: Minor fix for opening links It looks like it unfolds to: > /bin/open /bin/open https://www.example.com Instead of the expected: > /bin/open https://www.example.com See "src/kits/app/Roster.cpp", BRoster::ArgVector::Init() method: // init vector if (error == B_OK) { fArgs[0] = fAppPath.Path(); // Here if (argc > 0 && args != NULL) { for (int i = 0; i < argc; i++) fArgs[i + 1] = args[i]; if (hasDocArg) fArgs[fArgc - 1] = fDocPath.Path(); } // NULL terminate (e.g. required by load_image()) fArgs[fArgc] = NULL; } Change-Id: Ie7e7155377637b93cbc3c1d225cb91b5e0d2dd7d Reviewed-on: https://review.haiku-os.org/754 Reviewed-by: waddlesplash --- src/apps/aboutsystem/HyperTextActions.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/apps/aboutsystem/HyperTextActions.cpp b/src/apps/aboutsystem/HyperTextActions.cpp index 5c8770ca26..be45453d06 100644 --- a/src/apps/aboutsystem/HyperTextActions.cpp +++ b/src/apps/aboutsystem/HyperTextActions.cpp @@ -33,9 +33,8 @@ URLAction::Clicked(HyperTextView* view, BPoint where, BMessage* message) if (get_ref_for_path("/bin/open", &ref)) return; - const char* args[] = { "/bin/open", fURL.String(), NULL }; - be_roster->Launch(&ref, 2, args); - + const char* args[] = { fURL.String(), NULL }; + be_roster->Launch(&ref, 1, args); }