mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-03 13:20:25 -05: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;
|
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…
Add table
Add a link
Reference in a new issue