diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-11-30 11:47:27 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-12-05 14:04:01 +0300 |
commit | e7b033d7b38bc55f934521b5f35060b43a8b0526 (patch) | |
tree | 52a99420086e7e86ac99ef4b2b96bd210504cf01 /butl/path | |
parent | cf8f3b830789a6bcc538d2f4d0e8a1425a110c47 (diff) |
Make path::normalize() to preserve ./, invalidate paths starting with \, / on Windows
Diffstat (limited to 'butl/path')
-rw-r--r-- | butl/path | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -808,7 +808,11 @@ namespace butl // Normalize the path and return *this. Normalization involves collapsing // the '.' and '..' directories if possible, collapsing multiple // directory separators, and converting all directory separators to the - // canonical form. + // canonical form. If cur_empty is true then collapse relative paths + // representing the current directory (for example, '.', './', 'foo/..') + // to an empty path. Otherwise convert it to the canonical form (./ on + // POSIX systems). Note that a non-empty path cannot become an empty one + // in the latter case. // // If actual is true, then for case-insensitive filesystems obtain the // actual spelling of the path. Only an absolute path can be actualized. @@ -818,7 +822,7 @@ namespace butl // etc.) are returned in their actual spelling. // basic_path& - normalize (bool actual = false); + normalize (bool actual = false, bool cur_empty = false); // Make the path absolute using the current directory unless it is already // absolute. Return *this. |