aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/owner_common.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/clients/cave/owner_common.cc')
-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 9d1b030f0..b051c146e 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;