From 5b80b067e7cd5d25be09641e228f0a08534c6a03 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 30 Nov 2016 16:47:16 +0300 Subject: Adapt to semantics change of path::normalize() --- bpkg/manifest.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bpkg/manifest.cxx') diff --git a/bpkg/manifest.cxx b/bpkg/manifest.cxx index 246251d..5569224 100644 --- a/bpkg/manifest.cxx +++ b/bpkg/manifest.cxx @@ -1675,9 +1675,8 @@ namespace bpkg } // Need to check path for emptiness before proceeding further as a valid - // non empty location can not have an empty path_ member. Note that path - // can become empty as a result of normalize () call. Example of such a - // path is 'a/..'. + // non empty location can not have an empty path_ member (which can be the + // case for the remote location, but not for the relative or absolute). // if (path_.empty ()) throw invalid_argument ("empty path"); @@ -2017,13 +2016,14 @@ namespace bpkg // dir_path ipath ( strip_path ( - u.path, strip_p ? strip_mode::component : strip_mode::version) / rpath); + u.path, + strip_p ? strip_mode::component : strip_mode::version) / rpath); static const char* invalid_location ("invalid repository location"); try { - ipath.normalize (); + ipath.normalize (false, true); // Current dir collapses to an empty one. } catch (const invalid_path&) { -- cgit v1.1