From 519f0fd3440742a86b9f202e9ef00f85dc027031 Mon Sep 17 00:00:00 2001 From: Simon Praetorius <simon.praetorius@tu-dresden.de> Date: Mon, 3 Dec 2018 11:19:34 -0500 Subject: [PATCH] bug in filesystem relative() corrected --- dune/vtk/utility/filesystem.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dune/vtk/utility/filesystem.cc b/dune/vtk/utility/filesystem.cc index 8988129..e8c4c06 100644 --- a/dune/vtk/utility/filesystem.cc +++ b/dune/vtk/utility/filesystem.cc @@ -26,7 +26,7 @@ namespace Dune { namespace filesystem { std::string path::string() const { if (empty()) - return ""; + return "."; auto it = begin(); auto result = *it; @@ -180,11 +180,11 @@ path relative(path const& a, path const& b) } // combine remaining parts of a to result path - path rel(*a_it++); + path rel("."); for (; a_it != a.end(); ++a_it) rel /= *a_it; return rel; } -} } // end namespace Dec +} } // end namespace Dune::filesystem -- GitLab