mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
policy return cleanup
This commit is contained in:
parent
570c93ec2c
commit
8a48b74cb4
24 changed files with 125 additions and 117 deletions
|
|
@ -57,7 +57,7 @@ _symlink_loop(const string &existingpath,
|
|||
const vector<const string*> newbasepaths,
|
||||
const char *oldpath,
|
||||
const char *newpath,
|
||||
const char *newdirpath)
|
||||
const string &newdirpath)
|
||||
{
|
||||
int rv;
|
||||
int error;
|
||||
|
|
@ -89,24 +89,22 @@ _symlink(Policy::Func::Search searchFunc,
|
|||
{
|
||||
int rv;
|
||||
string newdirpath;
|
||||
const char *newdirpathcstr;
|
||||
vector<const string*> newbasepaths;
|
||||
vector<const string*> existingpaths;
|
||||
|
||||
newdirpath = newpath;
|
||||
fs::path::dirname(newdirpath);
|
||||
newdirpathcstr = newdirpath.c_str();
|
||||
|
||||
rv = searchFunc(srcmounts,newdirpathcstr,minfreespace,existingpaths);
|
||||
rv = searchFunc(srcmounts,newdirpath,minfreespace,existingpaths);
|
||||
if(rv == -1)
|
||||
return -errno;
|
||||
|
||||
rv = createFunc(srcmounts,newdirpathcstr,minfreespace,newbasepaths);
|
||||
rv = createFunc(srcmounts,newdirpath,minfreespace,newbasepaths);
|
||||
if(rv == -1)
|
||||
return -errno;
|
||||
|
||||
return _symlink_loop(*existingpaths[0],newbasepaths,
|
||||
oldpath,newpath,newdirpathcstr);
|
||||
oldpath,newpath,newdirpath);
|
||||
}
|
||||
|
||||
namespace mergerfs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue