From 6c11d775bb2c57ad1d4cd92f3eac06a9e2696bbd Mon Sep 17 00:00:00 2001 From: Bohdan Dudar Date: Tue, 1 Oct 2024 20:37:47 +0200 Subject: [PATCH] Add explanation --- DDCore/src/XML/DocumentHandler.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DDCore/src/XML/DocumentHandler.cpp b/DDCore/src/XML/DocumentHandler.cpp index a8841f219..be750e315 100644 --- a/DDCore/src/XML/DocumentHandler.cpp +++ b/DDCore/src/XML/DocumentHandler.cpp @@ -40,9 +40,10 @@ namespace { } int s_minPrintLevel = dd4hep::INFO; - std::string _clean_fname(const std::string& s) { - std::string const& temp = getEnviron(s); - std::string temp2 = undressed_file_name(temp.empty() ? s : temp); + std::string _clean_fname(const std::string& filepath) { + // This function seems to resolve environment variables inside the filepath string and return resolved string + std::string const& temp = getEnviron(filepath); + std::string temp2 = undressed_file_name( temp.empty() ? filepath : temp ); if ( strncmp(temp2.c_str(),"file:",5)==0 ) return temp2.substr(5); return temp2; }