From b2733572c98ce85457b3820afe8aa2f72614b858 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 13 Jun 2016 19:33:15 +0300 Subject: Add path::home() --- butl/path.txx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'butl/path.txx') diff --git a/butl/path.txx b/butl/path.txx index 383f7fe..35c6956 100644 --- a/butl/path.txx +++ b/butl/path.txx @@ -255,11 +255,16 @@ namespace butl // if ((n > 2 && s[1] == ':' && s[2] != '\\' && s[2] != '/') || (n > 1 && s[0] == '\\' && s[1] == '\\')) - throw invalid_basic_path (s); + { + if (exact) + return false; + else + throw invalid_basic_path (s); + } #endif - // Strip trailing slashes except for the case where the single - // slash represents the root directory. + // Strip trailing slashes except for the case where the single slash + // represents the root directory. // for (; n > 1 && traits::is_separator (s[n - 1]); --n) ; -- cgit v1.1