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
commit d317309d89
Notes: sideshowbarker 2024-07-16 22:18:54 +09:00
9 changed files with 12 additions and 12 deletions

View file

@ -17,7 +17,7 @@ DeprecatedString s_serenity_resource_root;
ErrorOr<String> application_directory()
{
auto current_executable_path = TRY(Core::System::current_executable_path());
auto dirname = LexicalPath::dirname(current_executable_path.to_deprecated_string());
auto dirname = LexicalPath::dirname(current_executable_path);
return String::from_deprecated_string(dirname);
}