Browse Source

func_mknod_ff.cpp

bespoke-policies
Antonio SJ Musumeci 2 weeks ago
parent
commit
4b8d68fb03
  1. 19
      src/func_mknod_ff.cpp

19
src/func_mknod_ff.cpp

@ -26,26 +26,9 @@ Func2::MknodFF::operator()(const ugid_t &ugid_,
{ {
int rv; int rv;
fs::path fusedirpath; fs::path fusedirpath;
mode_t umask;
fusedirpath = fusepath_.parent_path(); fusedirpath = fusepath_.parent_path();
umask = 0; // TODO: get actual umask
// Find first branch with the directory
const Branch *existing_branch = nullptr;
for(const auto &branch : branches_)
{
if(fs::exists(branch.path / fusedirpath))
{
existing_branch = &branch;
break;
}
}
if(!existing_branch)
return -ENOENT;
// Find first branch for creation
const Branch *create_branch = nullptr; const Branch *create_branch = nullptr;
for(const auto &branch : branches_) for(const auto &branch : branches_)
{ {
@ -91,4 +74,4 @@ Func2::MknodFF::operator()(const ugid_t &ugid_,
{ {
return fs::mknod_as(ugid_, fullpath, mode_, dev_); return fs::mknod_as(ugid_, fullpath, mode_, dev_);
} }
}
}
Loading…
Cancel
Save