[*] Fix win32 cwd under processes

This commit is contained in:
Reece Wilson 2022-07-04 03:24:34 +01:00
parent f8c45613a1
commit ee07505952

View File

@ -42,7 +42,13 @@ namespace Aurora::Processes
ProcessImpl::ProcessImpl(const StartupParmaters &params) : startup_(params)
{
AuIOFS::NormalizePath(this->startup_.process, this->startup_.process);
if (this->startup_.workingDirectory)
{
AuString a;
AuIOFS::NormalizePath(a, this->startup_.workingDirectory.value());
this->startup_.workingDirectory = a;
}
this->startup_.args.insert(startup_.args.begin(), startup_.process);
// ehhhh https://github.com/tritao/WindowsSDK/blob/07983c7ba4f6861d15e23f195744c60c0c249ce0/SDKs/SourceDir/Windows%20Kits/10/Source/10.0.17763.0/ucrt/exec/cenvarg.cpp#L23
@ -431,7 +437,7 @@ namespace Aurora::Processes
std::wstring wcwd;
if (cwd)
{
wcwd = Locale::ConvertFromUTF8(this->windowsCli_);
wcwd = Locale::ConvertFromUTF8(cwd.value());
if (!wcwd.size())
{
SysPushErrorMem();