1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:14: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

@ -224,7 +224,7 @@ static PDF::PDFErrorOr<int> pdf_main(Main::Arguments arguments)
#if !defined(AK_OS_SERENITY)
if (debugging_stats || !render_path.is_empty()) {
// Get from Build/lagom/bin/pdf to Base/res/fonts.
auto source_root = LexicalPath(MUST(Core::System::current_executable_path()).to_deprecated_string()).parent().parent().parent().parent().string();
auto source_root = LexicalPath(MUST(Core::System::current_executable_path())).parent().parent().parent().parent().string();
Core::ResourceImplementation::install(make<Core::ResourceImplementationFile>(TRY(String::formatted("{}/Base/res", source_root))));
}
#endif