summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-mark.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index 46d3ca5b8..3f3b008ba 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -163,10 +163,10 @@ static bool SectionInSubTree(char const * const SubTree, std::string_view Needle
{
if (ConfigValueInSubTree(SubTree, Needle))
return true;
- auto const sub = Needle.find('/');
+ auto const sub = Needle.rfind('/');
if (sub == std::string_view::npos)
{
- std::string special{"<undefined>/"};
+ std::string special{"/"};
special.append(Needle);
return ConfigValueInSubTree(SubTree, special);
}