1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 18:04:58 +00:00

Everywhere: Unport Core::System::current_executable_path from new string

Storing paths in AK::String is never correct.
This commit is contained in:
Dan Klishch 2023-11-06 13:49:18 -05:00 committed by Andrew Kaster
parent 610fe28115
commit d317309d89
9 changed files with 12 additions and 12 deletions

View file

@ -25,7 +25,7 @@ ErrorOr<String> find_certificates(StringView serenity_resource_root)
{
auto cert_path = TRY(String::formatted("{}/res/ladybird/cacert.pem", serenity_resource_root));
if (!FileSystem::exists(cert_path)) {
auto app_dir = LexicalPath::dirname(TRY(Core::System::current_executable_path()).to_deprecated_string());
auto app_dir = LexicalPath::dirname(TRY(Core::System::current_executable_path()));
cert_path = TRY(String::formatted("{}/cacert.pem", LexicalPath(app_dir).parent()));
if (!FileSystem::exists(cert_path))