mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
Merge pull request #29146 from badone/wip-tracker-40835-OSDCap.PoolClassRNS-abort
osd/OSDCap: Check for empty namespace Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
4deb2b90b5
@ -115,7 +115,7 @@ bool OSDCapPoolNamespace::is_match(const std::string& pn,
|
||||
}
|
||||
}
|
||||
if (nspace) {
|
||||
if ((*nspace)[nspace->length() - 1] == '*' &&
|
||||
if (!nspace->empty() && nspace->back() == '*' &&
|
||||
boost::starts_with(ns, nspace->substr(0, nspace->length() - 1))) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user