Verified Commit 6aa9e6fa authored by JohnMH's avatar JohnMH

Attempt to convert all paths to canon in OBSerializer

parent 90dda272
Pipeline #2471 passed with stages
in 18 minutes and 23 seconds
......@@ -41,14 +41,12 @@ namespace OB{
#if HAVE_PUGIXML
// Attempts to convert file paths to file:// URI
std::string _ob_obserializer_load_uri_to_std(std::string ouri){
if(ouri.at(0) == '/'){
char* canonPath = realpath(ouri.c_str(), NULL);
if(canonPath){
if(canonPath[0] == '/'){
std::string retStr = std::string(canonPath);
free(canonPath);
return "file://" + retStr;
}
char* canonPath = realpath(ouri.c_str(), NULL);
if(canonPath){
if(canonPath[0] == '/'){
std::string retStr = std::string(canonPath);
free(canonPath);
return "file://" + retStr;
}
}
return ouri;
......
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