mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
Ladybird: Look for helper processes at {app_dir}/{helper}/{helper}
Currently, we only look at the relative path `./{helper}/{helper}`, which fails if the working directory is not the same as the directory where the ladybird binary lives.
This commit is contained in:
parent
ce9f4c3215
commit
3bc0e7a7ca
1 changed files with 4 additions and 1 deletions
|
@ -25,9 +25,12 @@ ErrorOr<void> spawn_helper_process(StringView process_name, ReadonlySpan<StringV
|
||||||
|
|
||||||
ErrorOr<Vector<String>> get_paths_for_helper_process(StringView process_name)
|
ErrorOr<Vector<String>> get_paths_for_helper_process(StringView process_name)
|
||||||
{
|
{
|
||||||
|
auto application_path = TRY(ak_string_from_qstring(QCoreApplication::applicationDirPath()));
|
||||||
Vector<String> paths;
|
Vector<String> paths;
|
||||||
|
|
||||||
TRY(paths.try_append(TRY(String::formatted("./{}/{}", process_name, process_name))));
|
TRY(paths.try_append(TRY(String::formatted("./{}/{}", process_name, process_name))));
|
||||||
TRY(paths.try_append(TRY(String::formatted("{}/{}", TRY(ak_string_from_qstring(QCoreApplication::applicationDirPath())), process_name))));
|
TRY(paths.try_append(TRY(String::formatted("{}/{}/{}", application_path, process_name, process_name))));
|
||||||
|
TRY(paths.try_append(TRY(String::formatted("{}/{}", application_path, process_name))));
|
||||||
TRY(paths.try_append(TRY(String::formatted("./{}", process_name))));
|
TRY(paths.try_append(TRY(String::formatted("./{}", process_name))));
|
||||||
// NOTE: Add platform-specific paths here
|
// NOTE: Add platform-specific paths here
|
||||||
return paths;
|
return paths;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue