From 3f219e4e984390a0c6c14d8f8d9ec6d2a08e6310 Mon Sep 17 00:00:00 2001 From: Serious-senpai <57554044+Serious-senpai@users.noreply.github.com> Date: Sat, 22 Jun 2024 14:19:42 +0700 Subject: [PATCH] Do not use system PATH --- src/include/client.hpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/include/client.hpp b/src/include/client.hpp index 8382330..166a4bd 100644 --- a/src/include/client.hpp +++ b/src/include/client.hpp @@ -253,15 +253,7 @@ namespace liteshell size--; } - wchar_t buffer[32767]; - if (GetEnvironmentVariableW(L"PATH", buffer, 32767) == 0) - { - throw std::runtime_error(utils::last_error("Unable to get PATH")); - } - - std::string env_path = utils::utf_convert(buffer); - - _environment->set_value("PATH", path.substr(0, size) + ";" + env_path); + _environment->set_value("PATH", path.substr(0, size)); _environment->set_value("errorlevel", "0"); }