Skip to content
Snippets Groups Projects
Commit 040a7632 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'issue/filesystem_relative' into 'master'

bug in filesystem relative() corrected

See merge request spraetor/dune-vtk!7
parents ba7a8410 519f0fd3
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ namespace Dune { namespace filesystem { ...@@ -26,7 +26,7 @@ namespace Dune { namespace filesystem {
std::string path::string() const std::string path::string() const
{ {
if (empty()) if (empty())
return ""; return ".";
auto it = begin(); auto it = begin();
auto result = *it; auto result = *it;
...@@ -180,11 +180,11 @@ path relative(path const& a, path const& b) ...@@ -180,11 +180,11 @@ path relative(path const& a, path const& b)
} }
// combine remaining parts of a to result path // combine remaining parts of a to result path
path rel(*a_it++); path rel(".");
for (; a_it != a.end(); ++a_it) for (; a_it != a.end(); ++a_it)
rel /= *a_it; rel /= *a_it;
return rel; return rel;
} }
} } // end namespace Dec } } // end namespace Dune::filesystem
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