aboutsummaryrefslogtreecommitdiff
path: root/butl/path
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-06-14 16:24:51 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-06-18 15:05:38 +0300
commit14e9635241fca41a7ba153040368256612ccb16f (patch)
tree73c24c5ac047338cd7afffe97db29f3188b14445 /butl/path
parentd326f16dd40013e8bea639ff95c2b249e7867e5e (diff)
Check path validity in path::init() on Windows
Diffstat (limited to 'butl/path')
-rw-r--r--butl/path8
1 files changed, 7 insertions, 1 deletions
diff --git a/butl/path b/butl/path
index 0645a4b..472e421 100644
--- a/butl/path
+++ b/butl/path
@@ -273,6 +273,10 @@ namespace butl
//
basic_path () {};
+ // Constructors that take a path string as an argument throw
+ // invalid_basic_path if the string is not a valid path (e.g. uses
+ // unsupported notation on Windows).
+ //
explicit
basic_path (C const* s): base_type (s) {init (this->path_);}
@@ -615,7 +619,9 @@ namespace butl
// If exact is true, return whether the initialization was
// successful, that is, the passed string is a valid path
- // and no modifications were necessary.
+ // and no modifications were necessary. Throw invalid_basic_path
+ // if the string is not a valid path (e.g. uses unsupported notation on
+ // Windows).
//
bool
init (string_type& s, bool exact = false);