From 06fed8a51fd7c3c9cbdd83e4e8b63ee6171f9ec1 Mon Sep 17 00:00:00 2001
From: Anna Wellmann <a.wellmann@tu-bs.de>
Date: Tue, 28 Jun 2022 10:07:46 +0000
Subject: [PATCH] Add slash to output path, when it is missing

---
 src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp
index 9315a4b47..14b4e8e96 100644
--- a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp
+++ b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp
@@ -52,7 +52,7 @@ Parameter::Parameter(int numberOfProcesses, int myId)
     initGridPaths();
     initGridDist();
     initMultiKernel();
-    this->setFName(this->getOutputPath() + "/" + this->getOutputPrefix());
+    this->setFName(this->getOutputPath() + this->getOutputPrefix());
 
     // initLBMSimulationParameter();
 }
@@ -67,7 +67,7 @@ Parameter::Parameter(const vf::basics::ConfigurationFile &configData, int number
     initGridPaths();
     initGridDist();
     initMultiKernel();
-    this->setFName(this->getOutputPath() + "/" + this->getOutputPrefix());
+    this->setFName(this->getOutputPath() + this->getOutputPrefix());
 
     // initLBMSimulationParameter();
 }
@@ -749,6 +749,10 @@ void Parameter::setTimeCalcMedEnd(int CalcMedEnd)
 }
 void Parameter::setOutputPath(std::string oPath)
 {
+    // add missing slash to outputPath
+    if (oPath.back() != '/')
+        oPath += "/";
+
     ic.oPath = oPath;
 }
 void Parameter::setOutputPrefix(std::string oPrefix)
-- 
GitLab