mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-04 05:40:13 -05: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
|
|
@ -88,13 +88,13 @@ _statx(const Policy::Search &searchFunc_,
|
|||
{
|
||||
int rv;
|
||||
std::string fullpath;
|
||||
StrVec basepaths;
|
||||
std::vector<Branch*> branches;
|
||||
|
||||
rv = searchFunc_(branches_,fusepath_,&basepaths);
|
||||
rv = searchFunc_(branches_,fusepath_,branches);
|
||||
if(rv == -1)
|
||||
return -errno;
|
||||
|
||||
fullpath = fs::path::make(basepaths[0],fusepath_);
|
||||
fullpath = fs::path::make(branches[0]->path,fusepath_);
|
||||
|
||||
switch(followsymlinks_)
|
||||
{
|
||||
|
|
@ -124,7 +124,7 @@ _statx(const Policy::Search &searchFunc_,
|
|||
if(symlinkify_ && symlinkify::can_be_symlink(*st_,symlinkify_timeout_))
|
||||
symlinkify::convert(fullpath,st_);
|
||||
|
||||
fs::inode::calc(basepaths[0],fusepath_,st_);
|
||||
fs::inode::calc(branches[0]->path,fusepath_,st_);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue