|
@ -49,8 +49,8 @@ _mknod(Policy::Func::Search searchFunc, |
|
|
int rv; |
|
|
int rv; |
|
|
int error; |
|
|
int error; |
|
|
string dirname; |
|
|
string dirname; |
|
|
|
|
|
string existingpath; |
|
|
vector<string> createpaths; |
|
|
vector<string> createpaths; |
|
|
vector<string> existingpath; |
|
|
|
|
|
|
|
|
|
|
|
dirname = fs::path::dirname(fusepath); |
|
|
dirname = fs::path::dirname(fusepath); |
|
|
rv = searchFunc(srcmounts,dirname,minfreespace,existingpath); |
|
|
rv = searchFunc(srcmounts,dirname,minfreespace,existingpath); |
|
@ -64,12 +64,12 @@ _mknod(Policy::Func::Search searchFunc, |
|
|
error = -1; |
|
|
error = -1; |
|
|
for(size_t i = 0, ei = createpaths.size(); i != ei; i++) |
|
|
for(size_t i = 0, ei = createpaths.size(); i != ei; i++) |
|
|
{ |
|
|
{ |
|
|
string &createpath = createpaths[0]; |
|
|
|
|
|
|
|
|
string &createpath = createpaths[i]; |
|
|
|
|
|
|
|
|
if(createpath != existingpath[0]) |
|
|
|
|
|
|
|
|
if(createpath != existingpath) |
|
|
{ |
|
|
{ |
|
|
const ugid::SetRootGuard ugidGuard; |
|
|
const ugid::SetRootGuard ugidGuard; |
|
|
fs::clonepath(existingpath[0],createpath,dirname); |
|
|
|
|
|
|
|
|
fs::clonepath(existingpath,createpath,dirname); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
fs::path::append(createpath,fusepath); |
|
|
fs::path::append(createpath,fusepath); |
|
|