Due to a key rollover of our WebSSO provider there might be a short downtime of this Gitlab server on Friday 2.

Commit 33f4fc56 authored by Michael Kuron's avatar Michael Kuron 🔬

Correctly use filesystem::absolute/canonical on recent C++ standard libraries

The two-argument version was removed late in the standardization process
parent be036c15
Pipeline #25626 passed with stages
in 275 minutes and 58 seconds
......@@ -77,17 +77,21 @@ namespace python_coupling {
std::string cwd(cwd_buf);
std::free(cwd_buf);
path = filesystem::absolute( path, cwd );
#else
filesystem::path cwd = filesystem::current_path();
path = filesystem::absolute( path );
#endif
path = filesystem::absolute( path, cwd );
if ( path.extension() == ".py" )
{
moduleName = path.stem().string();
if ( ! path.parent_path().empty() ) {
#ifdef CURRENT_PATH_WORKAROUND
std::string p = filesystem::canonical(path.parent_path(), cwd).string();
#else
std::string p = filesystem::canonical(path.parent_path()).string();
#endif
code << "sys.path.append( r'" << p << "')" << "\n";
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment