Skip to content
Snippets Groups Projects
Commit 020ddd59 authored by Fabian Reister's avatar Fabian Reister
Browse files

DiskMemoryItemMixin: allow memoryBasePath to contain environment variables

parent 208dca3f
No related branches found
No related tags found
Loading
Checking pipeline status
......@@ -12,6 +12,7 @@
// ArmarX
#include <ArmarXCore/core/exceptions/LocalException.h>
#include <ArmarXCore/core/logging/Logging.h>
#include <ArmarXCore/core/system/ArmarXDataPath.h>
#include <ArmarXCore/core/time/TimeUtil.h>
namespace armarx::armem::server::ltm::detail::mixin
......@@ -69,13 +70,17 @@ namespace armarx::armem::server::ltm::detail::mixin
Path
DiskMemoryItemMixin::getMemoryBasePath() const
{
if(memoryBasePathString.empty()){
return memoryBasePath;
} else {
std::filesystem::path newPath;
newPath.assign(memoryBasePathString);
return newPath;
}
std::string p = [&](){
if(memoryBasePathString.empty()){
return memoryBasePath.string();
}
return memoryBasePathString;
}();
ArmarXDataPath::ReplaceEnvVars(p);
return p;
}
Path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment