mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Rework policies to return branches rather than path strings
This commit is contained in:
parent
7e084ea7db
commit
86b50d2d4e
86 changed files with 1259 additions and 3088 deletions
|
|
@ -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_);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue