aboutsummaryrefslogtreecommitdiff
path: root/bpkg
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-30 16:47:16 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-12-03 21:52:28 +0300
commit5b80b067e7cd5d25be09641e228f0a08534c6a03 (patch)
treee5dfca2f45718a3b36d61443b1147fd5f1cb5e79 /bpkg
parentfcd6a367e71f37c566a34daa87cf524397a9ba67 (diff)
Adapt to semantics change of path::normalize()
Diffstat (limited to 'bpkg')
-rw-r--r--bpkg/manifest.cxx10
1 files changed, 5 insertions, 5 deletions
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&)
{