LibCore: Implement System::current_executable_path on Windows

This commit is contained in:
stasoid 2025-02-13 10:43:55 +05:00 committed by Andrew Kaster
parent ddcd48d12e
commit 10db20a537
Notes: github-actions[bot] 2025-03-20 02:26:42 +00:00
3 changed files with 11 additions and 3 deletions

View file

@ -11,6 +11,7 @@
#include <AK/ByteString.h>
#include <AK/ScopeGuard.h>
#include <LibCore/Process.h>
#include <LibCore/System.h>
#include <direct.h>
#include <sys/mman.h>
@ -263,4 +264,9 @@ u64 physical_memory_bytes()
return ms.ullTotalPhys;
}
ErrorOr<ByteString> current_executable_path()
{
return TRY(Process::get_name()).to_byte_string();
}
}