Linux SetWorkingDirectory

This commit is contained in:
Sajid 2025-01-28 15:05:09 +06:00
parent d0509e0890
commit 2b6013ad26

View file

@ -29,10 +29,9 @@ std::filesystem::path os::process::GetWorkingDirectory()
} }
} }
// TODO
bool os::process::SetWorkingDirectory(const std::filesystem::path& path) bool os::process::SetWorkingDirectory(const std::filesystem::path& path)
{ {
return chdir(path.c_str()) == 0; return chdir(path.u8string().c_str()) == 0;
} }
bool os::process::StartProcess(const std::filesystem::path& path, const std::vector<std::string>& args, std::filesystem::path work) bool os::process::StartProcess(const std::filesystem::path& path, const std::vector<std::string>& args, std::filesystem::path work)