mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
func_mknod_ff.cpp
This commit is contained in:
parent
234f534204
commit
4b8d68fb03
1 changed files with 1 additions and 18 deletions
|
|
@ -26,26 +26,9 @@ Func2::MknodFF::operator()(const ugid_t &ugid_,
|
|||
{
|
||||
int rv;
|
||||
fs::path fusedirpath;
|
||||
mode_t umask;
|
||||
|
||||
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;
|
||||
for(const auto &branch : branches_)
|
||||
{
|
||||
|
|
@ -91,4 +74,4 @@ Func2::MknodFF::operator()(const ugid_t &ugid_,
|
|||
{
|
||||
return fs::mknod_as(ugid_, fullpath, mode_, dev_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue