Rework policies to return branches rather than path strings

This commit is contained in:
trapexit 2025-05-17 16:35:18 -05:00 • committed by GitHub
parent 7e084ea7db
commit 86b50d2d4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
86 changed files with 1259 additions and 3088 deletions

View file

@ -93,7 +93,7 @@ namespace l
static
int
readlink(const Policy::Search &searchFunc_,
const Branches &branches_,
const Branches &ibranches_,
const char *fusepath_,
char *buf_,
const size_t size_,
@ -102,13 +102,18 @@ namespace l
{
int rv;
StrVec basepaths;
std::vector<Branch*> obranches;
rv = searchFunc_(branches_,fusepath_,&basepaths);
rv = searchFunc_(ibranches_,fusepath_,obranches);
if(rv == -1)
return -errno;
return l::readlink_core(basepaths[0],fusepath_,buf_,size_,
symlinkify_,symlinkify_timeout_);
return l::readlink_core(obranches[0]->path,
fusepath_,
buf_,
size_,
symlinkify_,
symlinkify_timeout_);
}
}