mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
create different policies based on category of use
This commit is contained in:
parent
51b6d3f647
commit
0c60701b29
23 changed files with 589 additions and 290 deletions
|
|
@ -66,16 +66,17 @@ _mkdir(Policy::Func::Search searchFunc,
|
|||
return -errno;
|
||||
|
||||
error = 0;
|
||||
for(Paths::const_iterator
|
||||
i = createpaths.begin(), ei = createpaths.end(); i != ei; ++i)
|
||||
for(size_t i = 0, ei = createpaths.size(); i != ei; i++)
|
||||
{
|
||||
if(i->base != existingpath[0].base)
|
||||
const string &createpath = createpaths[i].base;
|
||||
|
||||
if(createpath != existingpath[0].base)
|
||||
{
|
||||
const mergerfs::ugid::SetResetGuard ugid(0,0);
|
||||
fs::clonepath(existingpath[0].base,i->base,dirname);
|
||||
fs::clonepath(existingpath[0].base,createpath,dirname);
|
||||
}
|
||||
|
||||
fullpath = fs::make_path(i->base,fusepath);
|
||||
fullpath = fs::make_path(createpath,fusepath);
|
||||
|
||||
rv = ::mkdir(fullpath.c_str(),mode);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue