From 14e9635241fca41a7ba153040368256612ccb16f Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 14 Jun 2016 16:24:51 +0300 Subject: Check path validity in path::init() on Windows --- butl/path | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'butl/path') 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); -- cgit v1.1