aboutsummaryrefslogtreecommitdiff
path: root/butl/path.txx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-06-13 19:33:15 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-06-18 15:05:38 +0300
commitb2733572c98ce85457b3820afe8aa2f72614b858 (patch)
tree8c6fa2b2cf408eb11ed557d5e5f3491883c6f733 /butl/path.txx
parent14e9635241fca41a7ba153040368256612ccb16f (diff)
Add path::home()
Diffstat (limited to 'butl/path.txx')
-rw-r--r--butl/path.txx11
1 files changed, 8 insertions, 3 deletions
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<C> (s);
+ {
+ if (exact)
+ return false;
+ else
+ throw invalid_basic_path<C> (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) ;