aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-24 14:33:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-24 14:33:12 +0200
commit7f5bcc495495b6a4d4fbd4e6bceea26f560d9f7b (patch)
tree66bedb5115c15445c809cf41a87ad6f1ec5f8e67
parenta1c171953b4d3679b42c748c31641f9108d8de23 (diff)
Add note on relative path normalization
-rw-r--r--libbutl/path.mxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbutl/path.mxx b/libbutl/path.mxx
index a0cdd90..c3bb42d 100644
--- a/libbutl/path.mxx
+++ b/libbutl/path.mxx
@@ -740,6 +740,10 @@ LIBBUTL_MODEXPORT namespace butl
// unless sep is false, non-canonical directory separators. Empty path
// is considered normalized.
//
+ // Note that for a relative path normalize() may produce a path for which
+ // normalized() will still return false (for example, ../foo/../ which
+ // will be normalized to ../).
+ //
bool
normalized (bool sep = true) const;
@@ -990,6 +994,10 @@ LIBBUTL_MODEXPORT namespace butl
// Normally one can assume that "well-known" directories (current, home,
// etc.) are returned in their actual spelling.
//
+ // Note that for a relative path normalize() may produce a path for which
+ // normalized() will still return false (for example, ../foo/../ which
+ // will be normalized to ../).
+ //
basic_path&
normalize (bool actual = false, bool cur_empty = false);