From 5cbb86ab1d4d10371fb765f4e283af47298fec34 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 30 Nov 2016 17:34:37 +0200 Subject: Implement path canonicalize() --- butl/path.ixx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'butl/path.ixx') diff --git a/butl/path.ixx b/butl/path.ixx index 8004821..c87a376 100644 --- a/butl/path.ixx +++ b/butl/path.ixx @@ -217,6 +217,18 @@ namespace butl template inline basic_path& basic_path:: + canonicalize () + { + traits::canonicalize (this->path_); + + if (this->tsep_ > 1) // Non-canonical trailing separator. + this->tsep_ = 1; + + return *this; + } + + template + inline basic_path& basic_path:: complete () { if (relative ()) -- cgit v1.1