From 4dfe9950d2247b99522602c31499fa2691cde1a1 Mon Sep 17 00:00:00 2001 From: Christof Kraus <christof.kraus@psi.ch> Date: Thu, 30 Jul 2020 11:00:18 +0200 Subject: [PATCH] strip path of filename in method write3DField. --- src/Classic/Fields/Fieldmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Classic/Fields/Fieldmap.cpp b/src/Classic/Fields/Fieldmap.cpp index b8eb3e6b4..abaac55f9 100644 --- a/src/Classic/Fields/Fieldmap.cpp +++ b/src/Classic/Fields/Fieldmap.cpp @@ -740,10 +740,10 @@ void Fieldmap::write3DField(unsigned int nx, if (Ippl::myNode() != 0 || (ef.size() != numpoints && bf.size() != numpoints)) return; - size_t extensionStart = Filename_m.find_last_of('.'); + boost::filesystem::path p(Filename_m); std::string fname = Util::combineFilePath({ OpalData::getInstance()->getAuxiliaryOutputDirectory(), - Filename_m.substr(0,extensionStart) + ".vtk" + p.stem().string() + ".vtk" }); std::ofstream of; of.open (fname); -- GitLab