Shell: Fix type builtin PATH resolution

We were not adding a '/' between PATH dir and the command
This commit is contained in:
2026-05-06 15:13:59 +03:00
parent d2e21f9380
commit 912647ce68

View File

@@ -217,8 +217,9 @@ void Builtin::initialize()
{
char path_buffer[PATH_MAX];
memcpy(path_buffer, path_dir.data(), path_dir.size());
memcpy(path_buffer + path_dir.size(), argument.data(), argument.size());
path_buffer[path_dir.size() + argument.size()] = '\0';
path_buffer[path_dir.size()] = '/';
memcpy(path_buffer + path_dir.size() + 1, argument.data(), argument.size());
path_buffer[path_dir.size() + 1 + argument.size()] = '\0';
if (is_executable_file(path_buffer))
{