Merge pull request #73 from isanae/master

Resolve cwd before creating directory
This commit is contained in:
isanae
2020-12-13 04:45:24 -05:00
committed by GitHub
+5 -1
View File
@@ -408,7 +408,11 @@ void process::create(
cx_->trace(context::cmd, "creating process");
if (!cwd.empty())
op::create_directories(*cx_, cwd);
{
// the path might be relative, especially when it comes from the command
// line, in which case it would fail the safety check
op::create_directories(*cx_, fs::absolute(cwd));
}
// cwd
const wchar_t* cwd_p = (cwd.empty() ? nullptr : cwd.c_str());