aboutsummaryrefslogtreecommitdiff
path: root/butl/path.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-30 17:34:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-30 17:34:37 +0200
commit5cbb86ab1d4d10371fb765f4e283af47298fec34 (patch)
treedda71d746a8a346a49da60e9b794b46e8dbb273f /butl/path.ixx
parentad6cee2e8bacebd876eb9171d0ea3f5e787746f9 (diff)
Implement path canonicalize()
Diffstat (limited to 'butl/path.ixx')
-rw-r--r--butl/path.ixx12
1 files changed, 12 insertions, 0 deletions
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 <typename C, typename K>
inline basic_path<C, K>& basic_path<C, K>::
+ canonicalize ()
+ {
+ traits::canonicalize (this->path_);
+
+ if (this->tsep_ > 1) // Non-canonical trailing separator.
+ this->tsep_ = 1;
+
+ return *this;
+ }
+
+ template <typename C, typename K>
+ inline basic_path<C, K>& basic_path<C, K>::
complete ()
{
if (relative ())