I'm trying to call 'git clone' from a C++ program in Windows, to do that I create an empty folder (using std::filesystem::create_directory and _chdir) then I use CreateProcessW this way:
::CreateProcessW(std::wstring(fullPath.begin(), fullPath.end()).c_str(),
const_cast<LPWSTR>(std::wstring(fullArgs.begin(), fullArgs.end()).c_str()),
nullptr,
nullptr,
TRUE,
_createNewConsole ? CREATE_NEW_CONSOLE : 0,
nullptr,
std::wstring(_path.begin(), _path.end()).c_str(),
&siStartInfo,
&piProcInfo);
But when I do that Git returns me the following error message:
fatal: could not create work tree dir 'XXXX': Permission denied
However since I created the folder myself I'm not sure what is the issue
Folder perms are the following:
drwxr-xr-x
Any idea how to solve that?