aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-02 18:17:38 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-02 18:17:38 +0100
commitb725eec6e014e202ee1c8fbda9328be1b358c6bb (patch)
treef3b87e99999ddbcdc38b02ce1fb9ba6cd9e3d20b
parentdaf2c293d314317d6fb322aa5eeba4eee4ac5653 (diff)
downloadpaludis-b725eec6e014e202ee1c8fbda9328be1b358c6bb.tar.gz
paludis-b725eec6e014e202ee1c8fbda9328be1b358c6bb.tar.xz
cave owner /blah/ should be like /blah
Fixes: ticket:991
-rw-r--r--src/clients/cave/owner_common.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/clients/cave/owner_common.cc b/src/clients/cave/owner_common.cc
index 9d1b030..b051c14 100644
--- a/src/clients/cave/owner_common.cc
+++ b/src/clients/cave/owner_common.cc
@@ -60,11 +60,15 @@ int
paludis::cave::owner_common(
const std::shared_ptr<Environment> & env,
const std::string & match,
- const std::string & query,
+ const std::string & q,
const std::function<void (const std::shared_ptr<const PackageID> &)> & callback)
{
bool found(false);
std::function<bool (const std::string &, const std::shared_ptr<const ContentsEntry> &)> handler;
+ std::string query(q);
+
+ if (query.length() >= 2 && '/' == query.at(query.length() - 1))
+ query.erase(query.length() - 1);
if ("full" == match)
handler = handle_full;