From b32579bad74e1b7f3a719fa49aad8566d20a6d2b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 26 Apr 2018 09:39:50 +0200 Subject: Relax path combination requirement for LHS to contain trailing slash Now if there is no slash, we automatically add the canonical one. This allows (natural) code like this: path f (d / "foo" / "bar"); --- libbutl/path.ixx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbutl/path.ixx') diff --git a/libbutl/path.ixx b/libbutl/path.ixx index b754bed..aef38eb 100644 --- a/libbutl/path.ixx +++ b/libbutl/path.ixx @@ -423,7 +423,7 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason. // switch (ts) { - case 0: if (!l.empty ()) throw invalid_basic_path (l); break; + case 0: if (!l.empty ()) l += path_traits::directory_separator; break; case -1: break; // Already in the string. default: l += path_traits::directory_separators[ts - 1]; } -- cgit v1.1