Browse Source

Merge pull request #203 from trapexit/mknod-fix

fix indexing of mknod targets. closes #202
pull/205/head
Antonio SJ Musumeci 9 years ago
parent
commit
091cc230d8
  1. 7
      src/mkdir.cpp
  2. 8
      src/mknod.cpp

7
src/mkdir.cpp

@ -47,9 +47,8 @@ _mkdir(Policy::Func::Search searchFunc,
int rv;
int error;
string dirname;
string fullpath;
string existingpath;
vector<string> createpaths;
vector<string> existingpath;
dirname = fs::path::dirname(fusepath);
rv = searchFunc(srcmounts,dirname,minfreespace,existingpath);
@ -65,10 +64,10 @@ _mkdir(Policy::Func::Search searchFunc,
{
string &createpath = createpaths[i];
if(createpath != existingpath[0])
if(createpath != existingpath)
{
const ugid::SetRootGuard ugidGuard;
fs::clonepath(existingpath[0],createpath,dirname);
fs::clonepath(existingpath,createpath,dirname);
}
fs::path::append(createpath,fusepath);

8
src/mknod.cpp

@ -49,8 +49,8 @@ _mknod(Policy::Func::Search searchFunc,
int rv;
int error;
string dirname;
string existingpath;
vector<string> createpaths;
vector<string> existingpath;
dirname = fs::path::dirname(fusepath);
rv = searchFunc(srcmounts,dirname,minfreespace,existingpath);
@ -64,12 +64,12 @@ _mknod(Policy::Func::Search searchFunc,
error = -1;
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;
fs::clonepath(existingpath[0],createpath,dirname);
fs::clonepath(existingpath,createpath,dirname);
}
fs::path::append(createpath,fusepath);

Loading…
Cancel
Save