mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
use references to srcmounts rather than copies
This commit is contained in:
parent
f7c37d2974
commit
6086620e23
49 changed files with 1050 additions and 717 deletions
|
|
@ -35,19 +35,20 @@ int
|
|||
_access(Policy::Func::Search searchFunc,
|
||||
const vector<string> &srcmounts,
|
||||
const size_t minfreespace,
|
||||
const string &fusepath,
|
||||
const char *fusepath,
|
||||
const int mask)
|
||||
{
|
||||
int rv;
|
||||
string path;
|
||||
string fullpath;
|
||||
vector<const string*> basepaths;
|
||||
|
||||
rv = searchFunc(srcmounts,fusepath,minfreespace,path);
|
||||
rv = searchFunc(srcmounts,fusepath,minfreespace,basepaths);
|
||||
if(rv == -1)
|
||||
return -errno;
|
||||
|
||||
fs::path::append(path,fusepath);
|
||||
fs::path::make(basepaths[0],fusepath,fullpath);
|
||||
|
||||
rv = ::eaccess(path.c_str(),mask);
|
||||
rv = ::eaccess(fullpath.c_str(),mask);
|
||||
|
||||
return ((rv == -1) ? -errno : 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue