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

bug in filesystem relative() corrected

parent ba7a8410
No related branches found
No related tags found
No related merge requests found
......@@ -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
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